Practice Questions
Lane A — Patterns & coding
Study step 7 of 26
40 MCQs ready
Strong coding-decoding helps.
Next topic in path →Concept Explanation
Input-Output (machine) questions give a line of words or digits and one or more fixed rules applied in order as Step I, Step II, Step III, and so on. Each step uses the output of the previous step as its input. Your job is to apply the rules exactly — no guessing extra operations.
Rules you will see often
- Words: alphabetical order, reverse order, swap first and last word, sort by word length, vowel-start before consonant-start.
- Numbers: sort digits ascending or descending, reverse the sequence, add or subtract 1 from each digit (0 stays 0; 9+1 becomes 0 when stated).
- Mixed: two steps in the question — always finish Step I before Step II.
How to solve fast
- Write Step I result on scratch; underline it before starting Step II.
- For digit rules, keep the same number of digits unless the question says otherwise (leading zeros count in the string).
- When words tie in length, keep the order given by the earlier step.
- If stuck, test one option backward only after you know the forward rule.
| Phrase in question | Action |
|---|---|
| Interchange first and last | Swap only end words (or end digits) |
| 10 becomes 0 | After adding 1 to 9, write 0 not 10 |
| Shortest to longest | Sort by word length, stable within ties |
-
Q1 EasyA machine rearranges words in each step.
Input: brown fox jumps over quick
Step I: words in alphabetical order (left to right).
Step II: first and last words interchange.
What is the output of Step II?ExplanationStep I: brown fox jumps over quick. Step II: quick fox jumps over brown. -
Q2 EasyInput: pen ink pad box
Step I: words in alphabetical order.
Step II: first and last words interchange.
What is Step II output?ExplanationStep I: box ink pad pen. Step II: pen ink pad box. -
Q3 EasyInput: logic is fun for all
Step I: words in alphabetical order.
Step II: vowel-start words first (keep order), then consonant-start words (keep order).
What is Step II output?ExplanationStep I: all for fun is logic. Step II: all is for fun logic. -
Q4 EasyInput: 5831
Step I: digits arranged in ascending order.
Step II: subtract 1 from each digit (0 stays 0).
What is Step II output?ExplanationStep I: 1358. Step II: 0247 → 4720. -
Q5 EasySame number machine (input 5831). What is Step I output?ExplanationAscending digits: 1358.
-
Q6 EasyInput: 4521
Step I: digits in descending order.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 5421. Step II: 6532. -
Q7 EasyInput: 1234
Step I: reverse the digit sequence.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 4321. Step II: 5432. -
Q8 EasyInput: ace bad cut done
Step I: words in alphabetical order.
Step II: reverse the word order.
What is Step II output?ExplanationStep I: ace bad cut done. Step II: done cut bad ace. -
Q9 EasyInput: north south east west
Step I: words in alphabetical order.
Step II: reverse the word order.
What is Step II output?ExplanationStep I: east north south west. Step II: west south north east. -
Q10 EasyInput: 3142
Step I: add 1 to each digit; 10 becomes 0.
Step II: digits in ascending order.
What is Step II output?ExplanationStep I: 4253. Step II: 2345.
-
Q11 EasyInput: 2468
Step I: reverse the digit sequence.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 8642. Step II: 7531. -
Q12 EasyInput: 8024
Step I: digits in ascending order.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 0248. Step II: 1359. -
Q13 EasyInput: 5423
Step I: digits in ascending order.
Step II: reverse the digit sequence.
What is Step II output?ExplanationStep I: 2345. Step II: 5432. -
Q14 EasyInput: cold wind rain heat
Step I: words in alphabetical order.
Step II: first and last words interchange.
What is Step II output?ExplanationStep I: cold heat rain wind. Step II: heat wind rain cold. -
Q15 EasyInput: 7284
Step I: digits in descending order.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 8742. Step II: 9853. -
Q16 EasyInput: 9153
Step I: digits in ascending order.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 1359. Step II: 0248. -
Q17 EasyInput: fast slow high low
Step I: words in alphabetical order.
Step II: first and last words interchange.
What is Step II output?ExplanationStep I: fast high low slow. Step II: slow high low fast. -
Q18 EasyInput: 6401
Step I: digits in descending order.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 6410. Step II: 5300. -
Q19 EasyInput: 4072
After Step I only (add 2 to each digit), what is the output?Explanation4→6, 0→2, 7→9, 2→4 gives 6294. -
Q20 EasyInput: milk rice bread fruit
Step I: words in alphabetical order.
Step II: reverse the word order.
What is Step II output?ExplanationStep I: bread fruit milk rice. Step II: rice milk fruit bread.
-
Q21 EasyInput: 4059
What is Step I output?ExplanationAscending digits: 0459. -
Q22 EasyInput: king pawn queen rook
Step I: words in alphabetical order.
Step II: first and last words interchange.
What is Step II output?ExplanationStep I: king pawn queen rook. Step II: rook pawn queen king. -
Q23 EasyInput: 2951
Step I: digits in descending order.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 9521. Step II: 8410. -
Q24 EasyInput: 1738
What is Step I output?Explanation1→2, 7→8, 3→4, 8→9 gives 2849. -
Q25 EasyInput: 4620
Step I: digits in ascending order.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 0246. Step II: 0135. -
Q26 EasyInput: step wall open door
Step I: words in alphabetical order.
Step II: reverse the word order.
What is Step II output?ExplanationStep I: door open step wall. Step II: wall step open door. -
Q27 MediumInput: they student are book wise
Step I: words in alphabetical order.
Step II: words arranged by length (shortest to longest); equal length keeps alphabetical order.
What is Step II output?ExplanationStep I: are book student they wise. Step II: are book they wise student. -
Q28 MediumInput: cat dog ant bird
Step I: words in reverse alphabetical order.
Step II: first and last words interchange.
What is Step II output?ExplanationStep I: dog cat bird ant. Step II: ant cat bird dog. -
Q29 MediumInput: 7319
Step I: digits in ascending order (as a 4-digit string).
Step II: interchange the first and last digits.
What is Step II output?ExplanationStep I: 1379. Step II: 9371. -
Q30 MediumInput: 6483
Step I: digits in descending order.
Step II: subtract 2 from each digit; if negative, use 0.
What is Step II output?ExplanationStep I: 8643. Step II: 6421.
-
Q31 MediumInput: 5713
Step I: digits in descending order.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 7531. Step II: 8642. -
Q32 MediumInput: play game read write
Step I: words in alphabetical order.
Step II: four-letter words before five-letter words (keep order in each group).
What is Step II output?ExplanationStep I: game play read write. Step II is unchanged. -
Q33 MediumInput: 1963
Step I: subtract 1 from each digit; 0 stays 0.
Step II: digits in descending order.
What is Step II output?ExplanationStep I: 0852. Step II: 9852. -
Q34 MediumInput: 3815
Step I: reverse the digit sequence.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 5183. Step II: 6294. -
Q35 MediumInput: 4072
Step I: add 2 to each digit; 10 becomes 0.
Step II: digits in ascending order.
What is Step II output?ExplanationStep I: 6294. Step II: 2469. -
Q36 MediumInput: 4059
Step I: digits in ascending order.
Step II: add 1 to each digit; 10 becomes 0.
What is Step II output?ExplanationStep I: 0459. Step II: 1560. -
Q37 MediumInput: 8362
Step I: reverse the digit sequence.
Step II: subtract 1 from each digit; 0 stays 0.
What is Step II output?ExplanationStep I: 2638. Step II: 1527. -
Q38 MediumInput: open door step wall
Step I: words in alphabetical order.
Step II: words of 4 letters first, then 5-letter words.
What is Step II output?ExplanationStep I: door open step wall. Step II: door open wall step. -
Q39 MediumInput: 1738
Step I: add 1 to each digit; 10 becomes 0.
Step II: digits in descending order.
What is Step II output?ExplanationStep I: 2849. Step II: 9842. -
Q40 HardInput: 2750
Step I: digits in ascending order.
Step II: interchange the second and third digits.
What is Step II output?ExplanationStep I: 0257. Step II: 0527.