Input-Output, Order & Direction for Bank Exams: Crack the Rule, Count the Rank, Walk the Map

Learn to decode machine input-output steps, solve order and ranking questions with one formula, track direction-sense walks and count elements in alphanumeric series quickly enough for IBPS and SBI prelims.

Reviewed by (19 years teaching)Written with AI helpReport a mistake

8 min read · Published 3 November 2026

Part of Banking (IBPS / SBI) prep

The sorting clerk at the bank counter

Picture a bank clerk with a messy pile of forms. Every minute she pulls out exactly one form, the next in her order, and places it neatly on the left of the desk. Watch her for two minutes and you know her rule, and then you can say exactly what the desk will look like at minute five. That is machine input-output. Ranking is the queue at the same counter, direction sense is the walk from the gate to the counter, and an alphanumeric series is the token board on the wall. Padho, dost, all four topics are about one skill: spot the pattern, then count carefully.

In IBPS PO, IBPS Clerk and SBI prelims, these topics together bring roughly 5 to 10 marks in the Reasoning section. Input-output usually comes as a set of 5 questions on one machine, while ranking, direction and series questions appear as quick one-liners or small sets of 3. None of them needs heavy theory. What they need is a clean method, a neat rough sheet and the discipline to check each step, because the 0.25 negative marking punishes a single careless count.

Part 1: Machine input-output

A word and number arrangement machine takes a line of words and numbers as input and rearranges them one step at a time using a fixed rule. You are shown the input and two or three steps. Your job is to find the rule, then work out any later step, the final output, or the position of an element in a particular step. Each question in this chapter's practice is self-contained: it gives you its own input and its own shown steps.

Common rule typeWhat happens each stepHow to spot it
Alphabetical wordsThe next word in dictionary order moves to the left end (or just after the already-arranged words)Step I starts with the word that comes first alphabetically
Ascending or descending numbersThe smallest (or largest) remaining number moves to one endCompare the number that moved in Step I with all the others
Mixed word plus numberOne word and one number move in the same step, often to opposite endsTwo elements change place in each step instead of one
Length-based wordsWords arranged by number of letters, with a tie broken alphabeticallyThe moved words get longer or shorter step by step

Word machine: alphabetical order to the left

Input: sun bat lamp fox dew

Step I: bat sun lamp fox dew (bat comes first alphabetically, so it moves to the left end)

Step II: bat dew sun lamp fox (dew is next, placed right after bat)

Rule found: each step, the next word in alphabetical order is placed just after the words already arranged.

Step III: bat dew fox sun lamp

Step IV: bat dew fox lamp sun (final output: all words in order)

Check: 5 words needed only 4 steps, because when the second-last word settles, the last one is automatically in place.

Mixed machine: word to the left, number to the right

Input: 48 cap 15 dog 72 ant 31

Step I: ant 48 cap 15 dog 31 72

Step II: ant cap 15 dog 31 48 72

Rule found: each step, the next word alphabetically goes to the left side (after the arranged words) and the largest remaining number goes to the right side (just before the arranged numbers).

Step III: ant cap dog 15 31 48 72

Final output reached in Step III: words in alphabetical order on the left, numbers in ascending order on the right.

The 4-step attack for any machine

  1. 1Compare the input with Step I element by element and circle what moved. Ask: why this element and not another?
  2. 2Test your guess on Step II. A real rule must explain both steps, not just one.
  3. 3Write only the steps the question asks for. If it asks for Step IV, build Steps III and IV on your rough sheet and stop.
  4. 4Count positions carefully at the end: 'third from the right in Step III' is where most marks are lost.
Trap alert: never assume the rule from Step I alone. In 'sun bat lamp fox dew', moving 'bat' to the front could mean alphabetical order or shortest word first. Step II (dew, not fox) confirms alphabetical. Always confirm with a second step before solving.

Quick check

A machine follows this pattern. Input: rose mint kiwi date. Step I: date rose mint kiwi. What is Step II?

Part 2: Order and ranking

Ranking questions ask about a person's position in a row, a queue or a class list, counted from the top or bottom, or from the left or right. One formula handles almost all of them. It works because the person is counted twice, once from each end.

Total = Rank from left + Rank from right - 1. Rank from right = Total - Rank from left + 1. People between two persons (both counted from the same end) = Difference of their ranks - 1.

Two people in one row

Riya is 14th from the top and 23rd from the bottom in her class. How many students are there?

Total = 14 + 23 - 1 = 36 students.

Next: in a row of 40, A is 10th from the left and B is 15th from the right. How many people sit between them?

Convert B to the left side: 40 - 15 + 1 = 26th from the left.

People between = 26 - 10 - 1 = 15.

Speed hack: before using the 'between' formula, always bring both ranks to the same end. Mixing a left rank with a right rank is the most common ranking mistake. If the two counts overlap (the left and right ranks add up to more than the total), the people are crossing each other, so draw a quick line diagram instead.

Part 3: Direction sense

Direction questions describe a walk: go north, turn right, walk again. You must find the final direction someone is facing, or the shortest distance and direction from the start. Always draw it. A rough sketch with North at the top takes ten seconds and saves you from almost every mistake.

FacingAfter a right turnAfter a left turn
NorthEastWest
EastSouthNorth
SouthWestEast
WestNorthSouth

Shortest distance from the start

Ravi walks 6 km north, turns right and walks 8 km. How far is he from his start, and in which direction?

Facing north, a right turn means he now walks east for 8 km.

He is 6 km north and 8 km east of the start, which forms a right-angled triangle.

Distance = square root of (6 × 6 + 8 × 8) = square root of 100 = 10 km.

Direction: north and east together, so he is 10 km North-East of the start.

If he now turns right again and walks 6 km (south), he ends exactly 8 km East of the start.

Shadow rule: the sun rises in the east, so in the morning a shadow falls towards the west. In the evening the sun is in the west, so a shadow falls towards the east. At noon there is practically no shadow. Remember the 3-4-5 and 6-8-10 triangles; they appear in distance questions all the time.

Quick check

Meena is facing north. She turns right, then right again, then left. Which direction is she facing now?

Part 4: Alphanumeric series

An alphanumeric series is a single line of letters, digits and symbols. Questions ask you to find an element at a position, or count how many elements satisfy a condition such as 'a letter immediately followed by a number'. Letter-position questions on the English alphabet also belong here, so learn the positions by heart.

Position from right = Total - Position from left + 1. Opposite letter pairs add to 27 (A-Z, B-Y, C-X ...). Memory key EJOTY: E = 5, J = 10, O = 15, T = 20, Y = 25.

Reading a series

Series: K 4 M # P 8 R @ 2 T $ W 6 (13 elements)

How many letters are immediately followed by a number? K-4 yes, M-# no, P-8 yes, R-@ no, T-$ no, W-6 yes. Answer: 3.

Which element is 7th from the left? Count K, 4, M, #, P, 8, R. Answer: R.

Which element is 4th from the right? 13 - 4 + 1 = 10th from the left, which is T.

Check from the right: 6, W, $, T. Same answer, T.

For counting questions, read the condition twice and then scan the series once, left to right, ticking each match with your pencil. Watch the exact words: 'immediately preceded by' looks at the element before, 'immediately followed by' looks at the element after.

Quick check

In a row of 30 students, Aman is 12th from the left. What is his position from the right?

Remember

  • Input-output: confirm the rule with at least two steps before solving.
  • A machine with n elements reaching full order needs at most n - 1 steps.
  • Ranking: Total = Left rank + Right rank - 1.
  • Bring both ranks to the same end before counting people in between.
  • Direction: always sketch with North at the top; right of North is East.
  • Morning shadow points west, evening shadow points east.
  • Alphabet positions: EJOTY = 5, 10, 15, 20, 25; opposite letters add to 27.

Ready to test yourself?

Lock it in with the practice test for this chapter.

Take the practice test

Keep studying

See all Banking (IBPS / SBI) study material →