Junior — Senior
Filtering a list of duplicate elements
livecode
Task condition
The method receives a list of integers and returns a new list with all duplicate values removed.
Input: [1, 4, 5, 4, 2, 1] Output: [1, 4, 5, 2]
class Solution {
public List<Integer> filterDuplicates(List<Integer> numbers) {
// TODO
}
}