F, G, H, M, N and O live on six different floors of the same building. The lowermost floor in the building is numbered 1, the floor above it, number 2 and so on till the topmost floor is numbered 6. Only two people live between F and N. Only two people live between M and H. No one lives above M. N lives below H but above O. On which floor does G live on?
Floor numbered 4
Floors are numbered 1 to 6 from the bottom. When exactly two people live between a pair of people, the pair must be three floors apart.
No one lives above M, so M is on floor 6. Only two people live between M and H, so H is on floor 3. N lives below H but above O, so N is on floor 2 and O is on floor 1.
Only two people live between F and N. N is on floor 2, so F is three floors away, on floor 5. The remaining person G takes the remaining floor 4. Check: floors 1 to 6 hold O, N, H, G, F and M in that order, and every clue holds.
Hence, Floor numbered 4.
Read the following information carefully and answer the question that follows.
Five coaching classes — P, Q, R, S, and T — are located on five different floors numbered 1, 2, 3, 4, and 5, but not necessarily in the same order. Each coaching class teaches only one of the following subjects: Physics, Chemistry, Mathematics, Biology, and English, but not necessarily in the same order.
Based on the above information, determine on which floor Mathematics is taught.