You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
Which passes the tests and then applying
Collections.shuffle()
to it, like this:The resulting solution must pass tests according to the statement, but it doesn't.
The text was updated successfully, but these errors were encountered: