ReasoningVery hardIBPS PO · SBI PO · IBPS Clerk

Input–output: A machine rearranges a line of words. In each step, the machine takes the word that comes first in dictionary order among the words not yet arranged and moves it to the left, just after the words already arranged; the other words keep their relative order. The machine stops when all the words are arranged. Input: violet indigo blue green yellow orange red. How many steps does the machine need to complete the arrangement?

  1. A. 4
  2. B. 6
  3. C. 7
  4. D. 5

Correct answer: D. 5

Step I: blue violet indigo green yellow orange red; Step II: blue green violet indigo yellow orange red; Step III: blue green indigo violet yellow orange red; Step IV: blue green indigo orange violet yellow red; Step V: blue green indigo orange red violet yellow. The arrangement is complete after Step V, so 5 steps are needed.

हिंदी में

इनपुट-आउटपुट: एक मशीन शब्दों की एक पंक्ति को पुनर्व्यवस्थित करती है। प्रत्येक चरण में मशीन उन शब्दों में से, जिन्हें अभी व्यवस्थित नहीं किया गया है, शब्दकोश क्रम में सबसे पहले आने वाले शब्द को लेकर बाईं ओर, पहले से व्यवस्थित शब्दों के ठीक बाद, रख देती है; बाकी शब्द अपना सापेक्ष क्रम बनाए रखते हैं। जब सभी शब्द व्यवस्थित हो जाते हैं तो मशीन रुक जाती है। इनपुट: violet indigo blue green yellow orange red. मशीन को व्यवस्था पूरी करने में कितने चरण लगते हैं?

  1. A. 4
  2. B. 6
  3. C. 7
  4. D. 5

उत्तर: D. चरण I: blue violet indigo green yellow orange red; चरण II: blue green violet indigo yellow orange red; चरण III: blue green indigo violet yellow orange red; चरण IV: blue green indigo orange violet yellow red; चरण V: blue green indigo orange red violet yellow. व्यवस्था चरण V के बाद पूर्ण हो जाती है, इसलिए 5 चरण आवश्यक हैं।

More Data Sufficiency and Input–Output questions

Exams that ask this topic