Answer the questions based on the following information.
A word arrangement machine, when given a particular input, rearranges it following a particular rule. Following is the illustration of the input and the steps of arrangement:
Input: She was interested in doing art film
Step 1: art she was interested in doing film
Step 2: art was she interested in doing film
Step 3: art was in she interested doing film
Step 4: art was in film she interested doing
Step 5: art was in film doing she interested
Step 5 is the last step of the given input. Now study the logic and rules followed in the above steps, find out appropriate step for the question given below for the given input.
How many steps will be required to get the final output from the following input?
Input: Father needs to check on the boy
The arrangement is made by the last letter of each word.
The last letters of the seven words of the sample sequence input were e, s, d, n, g, t, and m.
In the final step, the words were arranged as t, s, n, m, g, d, and e, i.e., in descending order.
In each step, one letter was fixed in its last step position.
In the given input, the last letters are r, s, o, k, n, e, and y.
The first step: y, r, s, o, k, n, and e.
The second step: y, s, r, o, k, n, and e.
The third step: y, s, r, o, n, k, and e.
Thus, the correct answer is 3 and the correct option is D.
Create a FREE account and get: