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