-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description:
Task 2 states that List<String>
of unique names must be returned, but ordering is not specified.
The issue can be replicated by taking the right solution:
public List <String> task2 (List <String> names) {
List<String> result = new ArrayList<>(List.copyOf(Set.copyOf(names)));
return result;
}
Which passes the tests and then applying Collections.shuffle()
to it, like this:
public List <String> task2 (List <String> names) {
var result = new ArrayList<>(List.copyOf(Set.copyOf(names)));
Collections.shuffle(result);
return result;
}
The resulting solution must pass tests according to the statement, but it doesn't.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working