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