Input: cat 28 dog 43 bat 59
Step 1: 59 cat 28 dog 43 bat
Step 2: 59 bat cat 28 dog 43
Step 3: 59 bat 43 cat 28 dog
Step 4: 59 bat 43 dog cat 28
What will be the final step for the input?
Show answer & explanation
Correct answer: C
Explanation
Given:
Input: cat 28 dog 43 bat 59
Step 1: 59 cat 28 dog 43 bat
Step 2: 59 bat cat 28 dog 43
Step 3: 59 bat 43 cat 28 dog
Step 4: 59 bat 43 dog cat 28
In each step, the last element (number/word) is taken and brought forward step-by-step, so the whole sequence gradually reverses.
So , the last step :
Step 5: 59 bat 43 dog 28 cat
Hence, the correct answer is option 3.