Task 4 of 5 · 0 solved · 5 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

10.3 Ordered collections — sorted distinct values

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in distinctSorted so that it returns every distinct word once, in alphabetical order, separated by spaces (trailing space included).

The program prints apple fig pear . One data structure does both jobs — no sorting code needed.

Your solution