Solution: Sort and Remove Duplicates in the Collection

Let's go over the solution of the "Sort and Remove Duplicates in the Collection" challenge.

Flowchart of a possible solution

We have to code two routines:

  • We build the collection using the first routine.

  • We use the second routine to print the collection words, but before printing, we have to sort and make our collection unique so that it doesn't have repetition.

Below is a flowchart informing us how this can be achieved:

Get hands-on with 1400+ tech skills courses.