Input: 8 cake 12 bag 5 apple
Step 1: 5 apple 8 cake 12 bag
Step 2: 5 apple 8 bag 12 cake
What is the logic applied?
Show answer & explanation
Correct answer: D
Explanation
First, numbers are arranged in increasing order with their words.
Then, words are arranged in alphabetical order without changing numbers’ positions.
Hence, the correct answer is 4.