ReasoningVery hardIBPS PO Mains · SBI PO Mains · SSC CGL Tier 2

Input–output: A machine rearranges a line of words. In each step it moves the shortest word among those not yet arranged to the left end, just after the words already placed there, and then moves the longest word among those not yet arranged to the right end, just before the words already placed there. If two words are equally short (or equally long), the one that comes first in dictionary order is moved first. Input: plum fig banana kiwi cherry lime mango tea. Which of the following is Step III?

  1. A. fig tea plum kiwi lime mango cherry banana
  2. B. fig tea kiwi plum lime mango banana cherry
  3. C. fig tea kiwi plum lime mango cherry banana
  4. D. fig tea kiwi lime plum mango cherry banana

Correct answer: C. fig tea kiwi plum lime mango cherry banana

Step I: fig plum kiwi cherry lime mango tea banana (banana goes first on the right as it precedes cherry in the dictionary). Step II: fig tea plum kiwi lime mango cherry banana. Step III: kiwi is the first of the four-letter words and mango is the longest left, giving fig tea kiwi plum lime mango cherry banana. The other options are Step II, a wrong tie-break and Step IV.

हिंदी में

इनपुट-आउटपुट: एक मशीन शब्दों की एक पंक्ति को पुनर्व्यवस्थित करती है। प्रत्येक चरण में वह अभी तक व्यवस्थित न किए गए शब्दों में से सबसे छोटे शब्द को बाईं ओर, वहाँ पहले से रखे शब्दों के ठीक बाद, ले जाती है और फिर अभी तक व्यवस्थित न किए गए शब्दों में से सबसे लंबे शब्द को दाईं ओर, वहाँ पहले से रखे शब्दों के ठीक पहले, ले जाती है। यदि दो शब्द समान रूप से छोटे (या समान रूप से लंबे) हों, तो शब्दकोश क्रम में पहले आने वाले शब्द को पहले ले जाया जाता है। इनपुट: plum fig banana kiwi cherry lime mango tea. निम्नलिखित में से कौन-सा चरण III है?

  1. A. fig tea plum kiwi lime mango cherry banana
  2. B. fig tea kiwi plum lime mango banana cherry
  3. C. fig tea kiwi plum lime mango cherry banana
  4. D. fig tea kiwi lime plum mango cherry banana

उत्तर: C. चरण I: fig plum kiwi cherry lime mango tea banana (banana दाईं ओर पहले जाता है क्योंकि शब्दकोश में वह cherry से पहले आता है)। चरण II: fig tea plum kiwi lime mango cherry banana। चरण III: चार अक्षर वाले शब्दों में kiwi पहले आता है और शेष में mango सबसे लंबा है, इसलिए fig tea kiwi plum lime mango cherry banana। अन्य विकल्प क्रमशः चरण II, गलत समान-लंबाई निर्णय और चरण IV हैं।

More Data Sufficiency and Input–Output questions

Exams that ask this topic