E ExamMaster

RRB JE Junior Engineer · General Intelligence & Reasoning

Order & Ranking

Determining positions of people or objects from left, right, top or bottom in an arrangement.

Almost every order-and-ranking item is one identity — left rank, right rank, and total — rearranged, and the mark sits in whether you remove the person who was counted twice. One running row threads the whole topic: Ravi is 7th from the left and 12th from the right, so 18 people stand in the row. From that one line you recover a rank from the other end, a between-count, the four-way opposite-end test, and (on a different row) a swap that must not be allowed to change the total.

  • RRB JE Junior Engineer
  • Easy level
  • 5 concepts
  • 45 practice questions

1Total equals left rank plus right rank minus one

In a single row (or column), a person's rank from the left and rank from the right both count that person. Picture Ravi in a row. '7th from the left' means six people stand to his left, then Ravi. '12th from the right' means eleven people stand to his right, then Ravi. Adding 7 + 12 therefore counts Ravi twice — once in each rank. Adding the two ranks therefore double-counts them, so the total number of people is left rank plus right rank minus 1. 7 + 12 − 1 = 18. Those 18 are: 6 on the left, Ravi, 11 on the right.

This is the single most-used relation in ranking problems. Given any two of the three quantities — left rank, right rank, total — the third drops out of the same identity. The trap is forgetting the −1 and reporting a total one too large. 7 + 12 = 19 is sitting in the options; it is the count with Ravi counted twice. Meena 9th from the left and 11th from the right is the same identity on new numbers: 9 + 11 − 1 = 19, and 20 is the inflated twin. Both ranks must refer to the same person; mixing Ravi's left-rank with someone else's right-rank is a different (later) question.

Figure. Schematic row: ends and Ravi only — not every seat.

Order of attack

  1. Name the two ranksWrite L for rank from the left (or top) and R for rank from the right (or bottom). Both must refer to the same person. Ravi: L = 7, R = 12.
  2. Apply total = L + R − 1Add the ranks, then subtract one to cancel the double-count of that person. 7 + 12 − 1 = 18.
  3. Refuse L + R aloneIf the options include L + R, that is the inflated total the −1 exists to kill. 19 is Ravi counted twice.

Total people in a row

In a row, Ravi is 7th from the left and 12th from the right. How many people are in the row?

  • L = 7 (from left), R = 12 (from right)same person counted in both
  • total = L + R − 1 = 7 + 12 − 118
  • People in the row18

Pro tip. The −1 cancels the double-count of Ravi himself — never omit it. 7 + 12 = 19 is the classic wrong option.

Meena is 9th from the left and 11th from the right in a row. How many people are in the row?
  1. 19
  2. 20
  3. 21

total = 9 + 11 − 1 = 19. 20 is 9 + 11 with the −1 dropped, and 21 adds one instead of removing the overlap.

2Convert a rank from the other end

Once the total is known, either rank is enough to recover the other. Rank from the right equals total minus rank from the left, plus 1 — the same identity solved for R instead of for total. On Ravi's row of 18, he is 7th from the left, so his rank from the right is 18 − 7 + 1 = 12, which is the 12 we already knew. The +1 puts Ravi back on the count: subtracting the left-rank from the total removes everyone from the left end through Ravi's seat, and you then put Ravi back.

Top and bottom in a class, or front and back in a queue, are the same conversion: fix the total, flip the end you are counting from, and remember the +1 that puts the person back on the count. Check against the first identity: 7 + 12 − 1 must return 18, and it does. Dropping the +1 gives 18 − 7 = 11, the rank of the person immediately to Ravi's right, not Ravi. The row does not get redrawn; only the end you measure from changes.

Figure. Same seat, two readings: rank from left and rank from right are linked by total − rank + 1. Flip the end you measure from; do not redraw the row.

How it works

  1. Hold the total fixedConversion never changes how many people are in the row; only the end you count from changes. Ravi's row stays 18.
  2. Subtract from total, then add 1R = total − L + 1 (or L = total − R + 1). 18 − 7 + 1 = 12. The +1 puts the person back after subtraction removes everyone from the far end through their seat.
  3. Check against total = L + R − 1Substitute your answer: the two ranks and the total must satisfy the identity from the total-from-two-ranks card. 7 + 12 − 1 = 18.

Right rank from a known total

In a row of 18 people, Ravi is 7th from the left. What is his rank from the right?

  • total = 18, L = 7R unknown
  • R = total − L + 1 = 18 − 7 + 112
  • Check: 7 + 12 − 118 = total

Pro tip. 18 − 7 = 11 is the number of people after Ravi, not his right-rank — the +1 counts Ravi from the other end.

In a class of 40, Anil is 13th from the top. His rank from the bottom is
  1. 27
  2. 28
  3. 29

Rank from bottom = 40 − 13 + 1 = 28. 27 is total − L with the +1 dropped; 29 adds one twice.

3Persons between two positions

When two people are located from the same end, the number of persons strictly between them is the absolute difference of their positions, minus 1. The −1 removes the two endpoints from the gap count — positions are seats of people, not empty spaces between seats. Stay on Ravi's left-scale: Ravi is 7th from the left and B is 12th from the left. |12 − 7| − 1 = 4. Those four are the people at seats 8, 9, 10 and 11. Answering 5 reports the raw difference and forgets the −1; answering 6 counts Ravi and B as well.

The exam wording 'exactly n between them' is the same fact run backwards: the position gap must be n + 1. Translate the words into a gap of n + 1 seats before placing anyone. 'Exactly 4 between A and B' means |pA − pB| = 5, so if A is at 7 then B is at 12 (or at 2). Convert both positions to ranks from the same end before subtracting — mixing a left-rank with a right-rank is the opposite-end four-way test, not this formula.

Figure. Six seats from position 7 through 12; people between are the four middle seats.

Order of attack

  1. Put both on one scaleConvert both positions to ranks from the same end (both from left, or both from top) before subtracting. Ravi 7th left, B 12th left — already one scale.
  2. Take |p1 − p2| − 1The absolute difference is the number of steps from one seat to the other; subtract 1 to leave only the people strictly between them (inclusive seat count is |p1 − p2| + 1, then drop both endpoints). |12 − 7| − 1 = 4.
  3. Flip 'exactly n between'If the stem says exactly n between them, the position difference must be n + 1 — place the second person that many seats away. Exactly 4 between means a difference of 5.
Words to position gap
WordingPosition relation
Persons between A and B|p_A − p_B| − 1
Exactly n between them|p_A − p_B| = n + 1
Immediate neighbours|p_A − p_B| = 1

Gap from two left-ranks

A is 7th from the left and B is 12th from the left in the same row. How many people sit between A and B?

  • A at 7, B at 12 (both from left)same end
  • |12 − 7| − 15 − 1 = 4
  • People between them4

Pro tip. Answering 5 reports the raw position difference |12 − 7| and forgets the −1 that drops one endpoint from the step count — the same −1 habit as in the total formula, aimed at a different question.

A is 4th from the left and B is 9th from the left in the same row. Persons between A and B:
  1. 4
  2. 5
  3. 6

|9 − 4| − 1 = 4. 5 is the raw difference with the −1 omitted; 6 treats the gap as if both ends were empty seats rather than occupied positions.

4Opposite ends: gap or overlap

A different trap appears when two people's positions are given from opposite ends — A is Lth from the left and B is Rth from the right — and the total is known. Compare L + R with total before counting anyone between them. Do not reach for |L − R| − 1; that formula needed both ranks on the same end.

Four readings, and they are not the same. If L + R is less than total, the two positions leave a gap and the people between them are total − L − R. If L + R equals total, the two sit on adjacent seats (zero between) — total 10, A 3rd left, B 7th right: 3 + 7 = 10, adjacent. If L + R equals total + 1, A and B name the same seat — the single-person identity, not a between-count. Ravi 7th left and 12th right in 18 is exactly this: 7 + 12 = 19 = 18 + 1, because both ranks were Ravi. Only when L + R exceeds total + 1 do two distinct people overlap or cross (total 20, A 12th left, B 12th right: 24 > 21); a naive gap formula then invents a negative count. Adjacent is equality to total; same seat is total + 1; overlap needs a sum strictly above total + 1.

Figure. Compare L + R with the known total before counting people between. Gap, adjacent, same seat, and overlap are four different readings.

Fix then decide

  1. Write L, R, and totalL is A's rank from one end; R is B's rank from the other. Keep the ends opposite — do not convert yet. Ravi's 7 and 12 against 18 is the same-person case of this test.
  2. Compare L + R with totalLess → gap; equal → adjacent (zero between); equal to total + 1 → same person; greater than total + 1 → overlap or crossing of two distinct people.
  3. Only then count betweenIn the gap case, people between = total − L − R. Same-person and overlap cases are not gap counts — do not use total − L − R there.
L from left, R from right, total known
CompareReadingPeople between
L + R < totalGap between A and Btotal − L − R
L + R = totalAdjacent seats0
L + R = total + 1Same person (one seat)not a between-count
L + R > total + 1Overlap or crossingdo not use total − L − R
In a row of 20, A is 8th from the left and B is 10th from the right. Which reading is correct?
  1. Gap: 2 people between them
  2. Adjacent seats
  3. Overlap: the stretches cross

L + R = 8 + 10 = 18, and total = 20, so 18 < 20: gap case. People between = 20 − 8 − 10 = 2. Adjacent would need 8 + 10 = 20; same person would need 8 + 10 = 21; overlap would need a sum above 21.

5After a swap, keep the total fixed

When two people interchange seats, the total number of people does not change. Only the swapped ranks move. Take a class of 30. Sita is 10th from the top. She swaps with the student who is 6th from the top. After the swap Sita sits in the 6th-from-top seat — that is her new rank from the top. The class is still 30. Convert to the bottom with the same identity as before: 30 − 6 + 1 = 25. Sita is now 25th from the bottom.

The common miss is recomputing a total from the new ranks as if the class had grown or shrunk, or converting with the old rank after the seat has already moved. Using Sita's old 10th seat gives 30 − 10 + 1 = 21 — the right formula on the wrong seat. Dropping the +1 on the new seat gives 24, the person just above her from the bottom. Ravi's 18-person row would work the same way: if he swapped into the 5th-from-left seat, his new right-rank would be 18 − 5 + 1 = 14, and 18 would not be touched.

Figure. After a swap the class size stays fixed. Convert the new top rank with total − rank + 1; using the old seat is the terracotta trap.

Order of attack

  1. Freeze the totalWrite the class or row size once and do not touch it after the swap. Sita's class stays 30.
  2. Take the new rankAfter the interchange, each person sits in the other's old seat — that seat's rank from the given end is the new rank. Sita takes 6th from the top.
  3. Convert only if askedIf the question wants the other end, use total − new rank + 1. Do not convert the pre-swap rank. 30 − 6 + 1 = 25.

Rank after interchange

In a class of 30, Sita is 10th from the top. If Sita and the student who is 6th from the top interchange, what is Sita's new rank from the bottom?

  • After swap, Sita takes the 6th-from-top seatnew top-rank = 6
  • total stays 30unchanged
  • rank from bottom = 30 − 6 + 125
  • Sita's new rank from the bottom25th

Pro tip. Keep the total fixed after a swap and convert the new top rank with total − rank + 1. Using Sita's old 10th seat gives 30 − 10 + 1 = 21 — the right formula on the wrong seat.

In a row of 25, P is 8th from the left. P swaps with the person who is 5th from the left. P's new rank from the right is
  1. 20
  2. 21
  3. 18

After the swap P is 5th from the left; total stays 25, so rank from right = 25 − 5 + 1 = 21. 20 drops the +1; 18 converts the old left-rank 8 instead of the new seat.

Notes

  • Position Conversion: A person's rank from the left plus rank from the right, minus 1, equals the total number of people. Use this to switch between the two viewpoints.
  • Total from Two Ranks: If someone is Lth from left and Rth from right, total = L + R - 1. This is the single most-used relation in ranking problems.
  • Overlapping Positions: When two people's positions are given from opposite ends, the number between them uses the total; watch whether their positions overlap or leave a gap.
  • Interchange of Positions: After two people swap seats, recompute using the new position and the unchanged total to find the other's rank.
  • Common trap: Double-counting the person themselves - the '-1' in L + R - 1 removes the single overlap; forgetting it inflates the total by one.

Formulas

  • Total persons = (\text{rank from left}) + (\text{rank from right}) - 1.
  • Rank from right = (\text{total}) - (\text{rank from left}) + 1.
  • Persons between two people = |\,\text{position}_1 - \text{position}_2\,| - 1.
  • After A and B interchange: new total is unchanged, so use old total with new position.
  • If ranks from both ends sum to more than total+1, the two positions overlap (same or crossing).

Exam traps & shortcuts

  • Memorise total = left + right - 1 and rearrange it for any missing quantity.
  • Draw a simple left-to-right line with the two known positions marked to avoid overlap confusion.
  • For 'exactly n between them', translate directly into a position gap of n+1 seats.
  • When positions are given after a swap, keep the total fixed and only update the swapped ranks.

Reference tables

Ranking identities
WantedIdentity
Total personsL + R − 1
Rank from the other endtotal − rank + 1
Persons between (same end)|p₁ − p₂| − 1
Exactly n between|p₁ − p₂| = n + 1
Opposite-end gap testcompare L + R with total

Recap

Read only this the night before.

Total
total = L + R − 1. The −1 kills the double-count of the person themselves.
Flip end
Other-end rank = total − rank + 1. Dropping the +1 reports how many sit beyond them, not their rank.
Between
|p₁ − p₂| − 1 from the same end. "Exactly n between" means a position gap of n + 1.
Opposite ends
Compare L + R with total before counting a gap. Adjacent when the sum equals total; same person when it equals total + 1; overlap only when it exceeds total + 1.
Swap
Total stays put. Move to the new seat's rank, then convert if the question asks for the other end.

Practise Order & Ranking

Reading is free and needs no account. Practice, mocks and progress live in the app.

  • 45 exam-style questions on this topic, with explanations
  • A 6-question practice set that ends the chapter
  • Timed mocks scored with the real marking scheme
  • Readiness tracked per topic, kept on your device
Continue with Google — freeNo card, no trial. Works offline once installed.