Interview Q&A / Aptitude

BeginnerQuick answer1 min readUpdated 3 Oct 2026

Ravi walks 10 km north, turns right and walks 6 km, then turns right again and walks 18 km. How far is he from his starting point, and in which direction?

SHORT ANSWER

10 km to the south-east. After the moves he is 6 km east and 10 - 18 = 8 km south of the start. Distance = square root of (6^2 + 8^2) = 10 km.

Explain it simply

Direction problems become easy if you track position as two numbers: how far east (or west) and how far north (or south). Each turn changes the direction you face; "right" from north is east, right from east is south. At the end, combine the east-west and north-south totals with Pythagoras.

Example

Question: 10 km north, right, 6 km, right, 18 km.

Start at (0, 0), with x east and y north.

  1. 10 km north: (0, 10). Facing north.
  2. Turn right: now facing east. 6 km: (6, 10).
  3. Turn right: now facing south. 18 km: (6, -8).
  4. Distance = square root of (36 + 64) = 10 km.
  5. He is east (x positive) and south (y negative): south-east of the start.
js
const x = 6, y = 10 - 18;
console.log(Math.hypot(x, y)); // Output: 10
console.log(y < 0 && x > 0 ? "south-east" : "other"); // Output: south-east

Right turns go clockwise: N, E, S, W. Left turns go anticlockwise: N, W, S, E.

What to say in the interview

"I track x and y. North 10, right puts me east for 6, right again puts me south for 18. I end at 6 east and 8 south, so 10 km away by Pythagoras, to the south-east."

Common mistakes

  • Adding all distances (34 km) instead of finding the straight-line distance.
  • Turning right from east and going north instead of south.

#aptitude#reasoning#directions

Related questions

Practise more Aptitude questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Aptitude quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.