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: pen pocket engine balloon cloud kitchen. Which element is sixth from the left end in Step II?
- A. cloud
- B. pocket
- C. pen
- D. kitchen
Correct answer: D. kitchen
Applying the rule step by step: Step I: pen pocket engine cloud balloon kitchen; Step II: pen pocket cloud engine balloon kitchen. In Step II the sixth element from the left is kitchen.
हिंदी में
इनपुट-आउटपुट: एक मशीन शब्दों की एक पंक्ति को पुनर्व्यवस्थित करती है। प्रत्येक चरण में मशीन पंक्ति को बाएँ से दाएँ एक बार देखती है, हर पास-पास के शब्दों के जोड़े की तुलना करती है, और जब भी बाएँ शब्द में दाएँ शब्द से अधिक अक्षर होते हैं तो दोनों शब्दों की अदला-बदली कर देती है (जाँच बदली हुई व्यवस्था के साथ आगे बढ़ती है)। जिस जाँच में किसी अदला-बदली की आवश्यकता नहीं होती उसे चरण नहीं गिना जाता और मशीन रुक जाती है। इनपुट: pen pocket engine balloon cloud kitchen। चरण II में बाएँ छोर से छठा अवयव कौन-सा है?
- A. cloud
- B. pocket
- C. pen
- D. kitchen
उत्तर: D. नियम को चरण-दर-चरण लगाने पर: चरण I: pen pocket engine cloud balloon kitchen; चरण II: pen pocket cloud engine balloon kitchen। चरण II में बाएँ से छठा अवयव kitchen है।
Practise more Data Sufficiency and Input–Output questionsData Sufficiency and Input–Output: notes and key points
More Data Sufficiency and Input–Output questions
- 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…
- Input–output: A machine rearranges a line of words. In each step the machine takes the word with the largest number of letters among the…
- Input–output: A machine rearranges a line of words and numbers. In each step the machine arranges one element. In odd-numbered steps it…
- Input–output: A machine rearranges a line of words and numbers. In each step the machine arranges one element. In odd-numbered steps it…
- Input–output: A machine rearranges a line of words and numbers. Step I: the numbers are rearranged in descending order, occupying only the…
- Input–output: A machine rearranges a line of words and numbers. In each step the machine arranges one element. In odd-numbered steps it…