Lessons / Ranking / Practice

Learn this topic first

Skip to the questions ↓

Read this, then start. Tap a topic to open or close it.

Ranking
Exam weightage: LowAbout 0-1 questions per placement paper. Seen most in Wipro, Cognizant. All topics

Ravi is 7th from the left and 12th from the right in a row. How many people are there? 7 + 12 - 1 = 18: Ravi was counted twice.

Left + right - 1 = total

A person counted from both ends is counted twice, so subtract 1.

Between two people: if A is p-th from the left and B is q-th from the left, there are |p - q| - 1 people between them.

Total = left rank + right rank - 1
Right rank = total - left rank + 1

From top or bottom, and people between

Top and bottom work exactly like left and right: rank from top + rank from bottom = total + 1.

People between two positions from the same end: |p - q| - 1. From opposite ends, turn one rank round first.

Ranks in a class with ties and unknown totals

If a question asks for the minimum number of people, the two people can overlap: the total is the larger count when they could be the same seat.

When A's rank from each end is known, the total is certain; when only relative positions are known, draw a line and mark every fact.

Worked exampleIn a class of 40, Priya is 15th from the top. What is her rank from the bottom?
  1. Bottom rank = 40 - 15 + 1.Rearranged identity.
  2. = 26.