Question 1
Input: ant horse elephant monkey zebra
Step 1: ant elephant horse monkey zebra
What will be the final output after complete sorting?
The words are arranged in alphabetical (dictionary) order. ant horse elephant monkey zebra → ant elephant horse monkey zebra