ReasoningHardIBPS PO Mains · SBI PO Mains · SSC CGL Tier 2

Input–output: A machine rearranges a line of words. In each step the machine scans the line once from left to right, comparing each pair of neighbouring words, and swaps the two words whenever the left word has more letters than the right word (the scan continues with the swapped arrangement). A scan in which no swap is needed is not counted as a step, and the machine stops. Input: silver pocket engine balloon market lemon. Which element is second from the left end in Step IV?

  1. A. engine
  2. B. lemon
  3. C. silver
  4. D. pocket

Correct answer: B. lemon

Applying the rule step by step: Step I: silver pocket engine market lemon balloon; Step II: silver pocket engine lemon market balloon; Step III: silver pocket lemon engine market balloon; Step IV: silver lemon pocket engine market balloon. In Step IV the second element from the left is lemon.

हिंदी में

इनपुट-आउटपुट: एक मशीन शब्दों की एक पंक्ति को पुनर्व्यवस्थित करती है। प्रत्येक चरण में मशीन पंक्ति को बाएँ से दाएँ एक बार देखती है, हर पास-पास के शब्दों के जोड़े की तुलना करती है, और जब भी बाएँ शब्द में दाएँ शब्द से अधिक अक्षर होते हैं तो दोनों शब्दों की अदला-बदली कर देती है (जाँच बदली हुई व्यवस्था के साथ आगे बढ़ती है)। जिस जाँच में किसी अदला-बदली की आवश्यकता नहीं होती उसे चरण नहीं गिना जाता और मशीन रुक जाती है। इनपुट: silver pocket engine balloon market lemon। चरण IV में बाएँ छोर से दूसरा अवयव कौन-सा है?

  1. A. engine
  2. B. lemon
  3. C. silver
  4. D. pocket

उत्तर: B. नियम को चरण-दर-चरण लगाने पर: चरण I: silver pocket engine market lemon balloon; चरण II: silver pocket engine lemon market balloon; चरण III: silver pocket lemon engine market balloon; चरण IV: silver lemon pocket engine market balloon। चरण IV में बाएँ से दूसरा अवयव lemon है।

More Data Sufficiency and Input–Output questions

Exams that ask this topic