Skip to content
ML Academy

SQL and Python

Interview question

  • seniorlevel
  • 15 minsuggested time
  • 2ML engineer, Data scientist

You have 10 million booking events (customer_id, booked_at, flight_no). For each booking, flag whether the same customer made another booking within the previous 24 hours. Describe two or three approaches, their time complexity and memory, and which one you would ship.

Tests: Algorithmic complexity on realistic data sizes, translating a pairwise problem into sort-and-scan, and choosing between Python, vectorised pandas and SQL.

Sign in to practise: answers are saved before model answers are shown.