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