Fill in distinctSorted so that it returns every distinct word once, in alphabetical order, separated by spaces (trailing space included).
distinctSorted
The program prints apple fig pear . One data structure does both jobs — no sorting code needed.
apple fig pear