Practice problem · LinkedIn · Medium

Meeting Scheduler

intervals.py defines intervals_collide(first, second), a helper for the room calendar. 3 stages in Python with an AI assistant. Pro.

Stage 1 of 3: Fix the overlap boundary bug

intervals.py defines intervals_collide(first, second), a helper for the room calendar. Each argument is a (begin, finish) tuple; reservations are half-open intervals [begin, finish).

The starter has a bug. Tests in tests/test_part1_overlap.py fail.

Find it and fix it. Don't change the public signature.

Done when Submit goes green.

Example 1
Input: RoomCalendar([Reservation(30, 60), Reservation(90, 120)]).next_open_slot(35, 20)
Output: 60

35 falls inside [30, 60). The gap [60, 90) holds 20 minutes, so the earliest slot starts at 60.

Constraints

  • Python 3.12+ standard library only
  • Time limit: 15 seconds per test
  • Editable: intervals.py, calendar_book.py
  • Read-only: all tests/test_*.py files
  • Times are non-negative integer minutes; intervals are half-open [begin, finish)

What comes after stage 1

The next stages open once the tests for the one before them pass. Each raises the bar, the way an interviewer does in the room.

  1. Stage 2: Find slots and reserve.
  2. Stage 3: Scale to a long booking history.

The files you get

  • Yours to edit: intervals.py, calendar_book.py.
  • Read-only: tests/__init__.py.
  • Tests you can read and run: tests/test_part1_overlap.py. Hidden tests run on Submit.

The round: an agent in the editor

The assistant here works like the one in the interview IDE. It reads your files, runs code and proposes changes, and you accept or reject each one. It doesn't volunteer ideas, so what gets built is what you asked for. Along the way the interviewer asks about your decisions, and at the end the report says what you checked and what you accepted unread.

Frequently asked, briefly answered

Is Meeting Scheduler free?

It is a Pro problem. Free plan includes one complete problem, plus the first stage of several more, so you can see how a round works before you pay.

Which company asks something like this?

LinkedIn. It is modelled on LinkedIn's round: AI-enabled coding round in CoderPad: the assistant writes the code into the editor while you direct it and check what it writes.

Do I bring my own AI tool?

No. The assistant is in the editor, same as in the interview IDEs at Meta, Stripe and Amazon. What you choose at Begin is the format: an agent that proposes changes you accept or reject, an answer-only assistant that can't write code, or no assistant at all.

What does the interviewer ask?

4 questions along the way about your own code, and one at the end about the whole session. A weak answer gets one follow up. The answers go into the report, which ends with a hire or no hire verdict.

Start the problem

Sign in and the problem opens where you left it. New here? An account takes a minute to create, and the Pro plan starts at the first stage of this problem.

Start this problem → Sign in

More like it: every practice problem, how LinkedIn runs its AI round, the AI coding interview guide.