Kavach Mains PracticeInput-Output

In each step the largest of the numbers not yet fixed is moved to the right-most free place. Study Step I to see how the machine moves numbers. A number that already stands in its place needs no step.
Input: 46 91 23 68 35 77
Step I: 46 77 23 68 35 91
How many steps are needed in all to complete the arrangement?

हर step में अभी तक fix न हुए numbers में से सबसे बड़ा number दाईं ओर की सबसे आख़िरी खाली जगह पर भेजा जाता है। Step I को देखकर समझें कि machine numbers को कैसे हिलाती है। जो number पहले से अपनी जगह पर है, उसके लिए कोई step नहीं लगता।
Input: 46 91 23 68 35 77
Step I: 46 77 23 68 35 91
Arrangement पूरा करने के लिए कुल कितने steps चाहिए?

Answer और ExplanationAnswer and explanation

Answer: (A) 3

1
Step I में 91 और 77 ने आपस में जगह बदली और कुछ नहीं हिला, इसलिए यह swap machine है। Final line 23 35 46 68 77 91 है।
2
Step II में 77 को place 5 पर जाना है। वह 35 से जगह बदलता है: 46 35 23 68 77 91।
3
Place 4 पर 68 चाहिए। वह वहाँ पहले से है, इसलिए कोई step नहीं लगता।
4
Step III में 46 को place 3 पर जाना है। वह 23 से जगह बदलता है: 23 35 46 68 77 91। अब places 1 और 2 भी सही हैं।
5
इस्तेमाल हुए steps I, II और III हैं, यानी कुल 3।
इसलिए answer (a) 3 है।
1
In Step I, 91 and 77 exchanged places and nothing else moved, so this is a swap machine. The final line is 23 35 46 68 77 91.
2
Step II: 77 must go to place 5. It swaps with 35: 46 35 23 68 77 91.
3
Place 4 needs 68. It is already there, so no step is used.
4
Step III: 46 must go to place 3. It swaps with 23: 23 35 46 68 77 91. Places 1 and 2 are now right.
5
Steps used are I, II and III, which makes 3.
So the answer is (a) 3

Source: Kavach Mains Practice। Solution: Prashant Sir, Kavach।Source: Kavach Mains Practice. Solution by Prashant Sir, from Kavach.