ReasoningVery hardIBPS PO · SBI PO · IBPS Clerk

Input–output: A machine rearranges a line of words and numbers. In each step, the machine moves the smallest number not yet arranged to the left, just after the numbers already arranged there, and then moves the word that comes last in dictionary order among the words not yet arranged to the right end, just before the words already arranged there. All other elements keep their relative order. The machine stops when every element is arranged. Input: red 77 blue 24 green 58 pink 13 grey 90 white 36. How many steps does the machine need to complete the arrangement?

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

Correct answer: A. 6

Each step places one number and one word, and with six of each the arrangement is complete only after Step VI: 13 24 36 58 77 90 blue green grey pink red white. 5 stops too early, since after Step V the 90 still sits after 'blue'; 12 counts one step per element, and 7 counts the input as a step.

हिंदी में

इनपुट-आउटपुट: एक मशीन शब्दों और संख्याओं की एक पंक्ति को पुनर्व्यवस्थित करती है। प्रत्येक चरण में मशीन अभी तक व्यवस्थित न की गई सबसे छोटी संख्या को बाईं ओर, वहाँ पहले से व्यवस्थित संख्याओं के ठीक बाद, ले जाती है, और फिर अभी तक व्यवस्थित न किए गए शब्दों में से शब्दकोश क्रम में सबसे अंत में आने वाले शब्द को दाएँ छोर पर, वहाँ पहले से व्यवस्थित शब्दों के ठीक पहले, ले जाती है। अन्य सभी तत्व अपना सापेक्ष क्रम बनाए रखते हैं। जब प्रत्येक तत्व व्यवस्थित हो जाता है तो मशीन रुक जाती है। इनपुट: red 77 blue 24 green 58 pink 13 grey 90 white 36. मशीन को व्यवस्था पूरी करने में कितने चरण लगते हैं?

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

उत्तर: A. प्रत्येक चरण में एक संख्या और एक शब्द व्यवस्थित होता है, और छह-छह होने के कारण व्यवस्था चरण VI के बाद ही पूर्ण होती है: 13 24 36 58 77 90 blue green grey pink red white। 5 बहुत जल्दी रुकना है, क्योंकि चरण V के बाद 90 अब भी 'blue' के बाद बैठा है; 12 प्रत्येक तत्व के लिए एक चरण गिनता है, और 7 इनपुट को भी एक चरण मान लेता है।

More Data Sufficiency and Input–Output questions

Exams that ask this topic