Order and ranking questions describe people in a row or a class list and give their positions from one or both ends. Nearly every question comes down to one idea: when you count a person's position from the top and from the bottom, that person is counted twice.
Total = position from top + position from bottom − 1
The same rule works for left and right in a row, or front and back in a queue. Rearranging it gives the position from the other end: position from bottom = total − position from top + 1.
Worked example 1: the total
Ravi is 14th from the top and 23rd from the bottom of his class. The class has 14 + 23 − 1 = 36 students.
Worked example 2: the other end
In a class of 40, Meena is 12th from the top. Her rank from the bottom is 40 − 12 + 1 = 29th.
A quick check: 12 + 29 − 1 = 40, which matches the class size.