← Agoda Interview Insights

Agoda·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Got a probability question for a Data Scientist role at Agoda. Classic geometric probability setup, the kind you'd see in a high school stats class but easy to fumble under pressure if you haven't thought about it in a while.

Questions Asked (1)

Q1

Two people each arrive at a random time within a one-hour window. What is the probability they end up meeting, given they'll wait up to 15 minutes for the other person?

Algorithms & Data Structures
Author's notes

The geometric approach is the cleanest way to do this.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem geometrically by plotting arrival times on a 2D plane, where the total area represents all possible arrival pairs. Identify the region where the absolute difference in arrival times is at most 15 minutes, and compute its area relative to the total area.

Pro tip: After calculating the probability, briefly discuss how the result would change if the waiting time were different, or if the arrivals were not uniform, to show deeper understanding and adaptability.

1. Define the sample space

Let X and Y be the arrival times of the two people, each uniformly distributed between 0 and 60 minutes. The sample space is the square [0,60] x [0,60] with area 3600.

2. Identify the meeting condition

They meet if |X - Y| <= 15. This defines a band around the line Y = X in the square.

3. Calculate the area of the meeting region

The area of the band is the total square area minus the areas of the two triangles where |X - Y| > 15. Each triangle has legs of length 45, so area = 0.5 * 45 * 45 = 1012.5. Total non-meeting area = 2025, so meeting area = 3600 - 2025 = 1575.

4. Compute the probability

Probability = meeting area / total area = 1575 / 3600 = 0.4375 or 43.75%.

5. Verify and interpret

Check that the probability is reasonable (less than 50% because the waiting time is a quarter of the window). Optionally, generalize to waiting time w: P = 1 - (1 - w/60)^2.

Key Points to Mention

  • Uniform distribution of arrival times
  • Geometric representation with a square and diagonal band
  • Area calculation for the meeting region
  • Complementary counting (non-meeting triangles)
  • General formula for waiting time w: P = 1 - (1 - w/60)^2
  • Assumption of independence between arrivals

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.