← Agoda Interview Insights

Agoda·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Agoda software engineer interview that threw a probability puzzle at me. Not the LeetCode grind I was expecting, more of a math/reasoning problem that felt like it came out of nowhere.

Questions Asked (1)

Q1

Two people each arrive at a random time within a one-hour window. They meet only if their arrival times are within 15 minutes of each other. What is the probability they actually meet?

Algorithms & Data Structures
Author's notes

I froze for a bit because I kept trying to think of it as a discrete problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem geometrically by representing arrival times as points in a unit square. The meeting condition defines a region within the square, so compute its area to find the probability.

Pro tip: After solving, mention that this geometric method generalizes to any meeting window, and that the complement (not meeting) is often easier to compute.

1. Define the sample space

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

2. Translate the meeting condition

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

3. Compute the area of the meeting region

The complement (not meeting) consists of two right triangles where X > Y + 15 and Y > X + 15. Each triangle has legs of length 45, so total non-meeting area is 2 * (1/2 * 45 * 45) = 2025. Thus meeting area = 3600 - 2025 = 1575.

4. Calculate the probability

Probability = meeting area / total area = 1575 / 3600 = 7/16 = 0.4375.

5. Verify and generalize

Check that the probability is between 0 and 1. Note that for a window of w minutes, the probability is 1 - (1 - w/60)^2, which for w=15 gives 7/16.

Key Points to Mention

  • Uniform distribution of arrival times
  • Geometric probability and area calculation
  • Complementary counting (easier to compute non-meeting region)
  • Equation of the meeting condition: |X - Y| <= 15
  • General formula for any meeting window
  • Assumption of independence between the two arrival times

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