There are seven friends A, B, C, D, E, F and G living in a seven-floor…

2026

There are seven friends A, B, C, D, E, F and G living in a seven-floor building. The ground floor is numbered 1, the floor above it is numbered 2, and so on up to floor 7.

E does not live on an even-numbered floor. G does not live on the topmost floor. Only one person lives between E and G. A does not live on an even-numbered floor and does not live below F. D does not live immediately above or immediately below G. There are two floors between D and E. Both B and C live on even-numbered floors. There are two floors between G and C. F lives on floor number 5.

Who is the immediate neighbor of G ?

  1. A.

    B

  2. B.

    D

  3. C.

    E

  4. D.

    F

Attempted by 4 students.

Show answer & explanation

Correct answer: A

Concept

In floor- or level-based seating puzzles, first fix the person(s) pinned by absolute clues (an exact floor number, an extreme position such as topmost/bottommost), then use the relative clues (fixed gaps, parity, direction) to narrow the remaining floors step by step, rejecting any partial placement that breaks a later clue, until every floor is uniquely assigned.

Application

  1. F is fixed directly at floor 5 (an absolute clue).

  2. A lives on an odd-numbered floor and does not live below F (floor 5); the only odd floor above 5 is floor 7, so A = 7.

  3. With A = 7 and F = 5, floors 1, 2, 3, 4 and 6 remain for B, C, D, E and G.

  4. E must occupy an odd floor from what remains, so E is either 1 or 3.

  5. G is exactly two floors from E (only one person lives between them). Testing E = 1 gives G = 3; testing E = 3 gives G = 1 (G = 5 is already F's floor).

  6. If E = 1 and G = 3, the 'two floors between D and E' clue forces D = 4 - but then D and G (floors 4 and 3) would be immediately adjacent, breaking the clue that D is not immediately above or below G. This case is rejected.

  7. So E = 3 and G = 1. The 'two floors between D and E' clue now gives D = 6 (D = 0 is impossible), and |D - G| = 5, which satisfies the non-adjacency clue.

  8. The two floors left, 2 and 4, go to B and C, both fixed to even-numbered floors by their own clue. The 'two floors between G and C' clue (floors 2 and 3 lying between floor 1 and floor 4) fixes C = 4, so B = 2.

Floor

Person

7

A

6

D

5

F

4

C

3

E

2

B

1

G

Cross-check

  • E (floor 3) is on an odd-numbered floor.

  • G (floor 1) is not on the topmost floor.

  • Exactly one person (B, floor 2) lives between E (floor 3) and G (floor 1).

  • A (floor 7) is odd-numbered and does not live below F (floor 5).

  • D (floor 6) is not immediately above or below G (floor 1) - they are five floors apart.

  • Two floors (4 and 5) lie between D (floor 6) and E (floor 3).

  • B (floor 2) and C (floor 4) both live on even-numbered floors.

  • Two floors (2 and 3) lie between G (floor 1) and C (floor 4).

Every clue checks out against the layout above, so G's immediate neighbor - the person on floor 2 - is B.

Explore the full course: Tcs Live Preparation