Quick Concept Summary
An Input-Output machine takes a line of words and numbers as input and rearranges them step by step until a final output is reached. Each step follows the same hidden rule.
Your job: Identify the rule from the given steps, then answer questions about other steps.
Common Patterns
Pattern 1 — Descending Sort from Left
Each step moves the largest remaining number to the leftmost available position.
Pattern 2 — Ascending from Right
Each step moves the smallest remaining number to the rightmost available position.
Pattern 3 — Alternating (Word left, Number right)
Odd steps: place the alphabetically first word at the leftmost position. Even steps: place the smallest number at the rightmost position.
Pattern 4 — Simultaneous (Word left + Number right)
Both a word AND a number are placed each step — one at each end.
Pattern 5 — Shift-based
All elements shift a fixed number of positions left or right each step.
Worked Examples
Example 1 — Descending Sort (Bank PO Style)
Input: 32 pink 51 blue 19 red 45 green
Observe Steps 1 and 2 to find the rule.
Step 1: 51 32 pink blue 19 red 45 green
(51, the largest number, moved to the front)
Step 2: 51 45 32 pink blue 19 red green
(45, the next largest, moved to position 2)
Step 3: 51 45 32 pink blue 19 red green → 51 45 32 19 pink blue red green
(19 is placed. Wait — actually 32 was already there. Each step, one more number is fixed from the left in descending order.)
Corrected trace:
Q: What is Step 3?
Example 2 — Alternating Pattern
Input: mango 84 apple 37 kiwi 62 plum 15
Step 1: apple mango 84 37 kiwi 62 plum 15
(Alphabetically first word 'apple' moved to front)
Step 2: apple mango 84 37 kiwi 62 plum 15 → apple mango 84 37 kiwi 62 plum 15
Wait — Step 2 places the smallest number at the end:
Step 2: apple mango 84 37 kiwi 62 plum 15
(15 placed at end — but it's already at end. Let me use a cleaner example.)
Revised Input: mango 84 apple 37 kiwi 62 plum 51
Note: patterns vary by exam. Always deduce from given steps — do not assume.
Example 3 — Both Ends Each Step
Input: 72 fair 39 good 81 calm 14 huge
For exam purposes: always confirm the rule from Step 1 → Step 2 before answering.
Example 4 — Finding Original Input (Reverse)
Q: The final output is: 15 27 39 51 cat dog rat pig. This is after 4 steps of ascending sort from left. What was the input?
Since numbers are sorted ascending from left in each step, the original input had these numbers in some random order. Words stay on the right in their original relative order.
Reverse: undo each step — move the leftmost sorted number back to its original random position. Without all intermediate steps, we cannot fully reverse. But the question is typically asked as: "What was Step 2?" — not the full reversal.
Example 5 — Step Counting
Q: How many steps are needed to fully sort the input 18 fox 92 ant 34 bee 71 dog (descending numbers left, then words alphabetically)?
Numbers: 18, 92, 34, 71 → 4 numbers need 4 steps to sort descending from left.
Words: fox, ant, bee, dog → 4 words arranged alphabetically from left after numbers are sorted.
But in alternating arrangements, both happen simultaneously — total steps = 4 (one per element pair).
Shortcuts and Tricks
Trick 1 — Identify pattern in 2 steps
Always compare Input → Step 1 and Step 1 → Step 2. If the same transformation holds, you've found the rule.
Trick 2 — Count elements
Count numbers and words separately. In sort-based patterns, the number of steps = number of distinct elements to sort.
Trick 3 — Locked elements don't move
Once an element is placed (e.g., largest number at position 1), it stays there for all subsequent steps.
Trick 4 — Both-ends pattern: work from outside in
If words fill from the left and numbers fill from the right, trace from both ends toward the middle.
Trick 5 — Shortcut to Step N
If Step 1 places one element, Step N places N elements. For the last step, all elements are sorted.
Exam Pattern
IBPS PO / SBI PO: 5 questions per input (a full set). Pattern difficulty: alternating or simultaneous arrangement. High weightage — 5 marks from one input.
IBPS Clerk: Simpler patterns, usually single-end sort. 4–5 questions.
SSC CGL: Rarely tests Input-Output deeply. 1–2 questions if present.
Placement (TCS, Capgemini): Occasionally appears. Usually a simple shift or sort pattern.
Practice Questions
Use this input for Q1–Q5:
Input: 65 win 29 aim 47 joy 83 bus
Observed steps:
| # | Question | Answer |
|---|---|---|
| 1 | What is Step 2? | aim bus 65 win 29 47 joy 83 |
| 2 | How many steps to complete? | 5 |
| 3 | Which element is fixed at Step 3 for the first time? | joy |
| 4 | What is the 3rd element in Step 4? | joy |
| 5 | In Step 5, what is at position 6? | 47 |
| 6 | If input were 99 cat 11 bat 55 ant, how many steps (sort desc left)? | 3 steps (3 numbers) |
| 7 | Step 1 places 99. What is Step 2 for above input? | 99 55 cat 11 bat ant |
| 8 | In a shift-left-by-1 machine: input = A B C D E. What is Step 3? | D E A B C |
| 9 | In same shift machine, which step gives B C D E A? | Step 4 |
| 10 | In a sort-ascending-from-right machine, how many steps for 5 3 8 1 6? | 5 steps |
