ludus

Meeting Blocks

ld-0015 · 6 › ██████░░░░ · arrays, intervals · requires: arrays, lambda · oner golfed

Your client manages a conference room. The booking list has one row per booking with a start and end (numbers — hours on a 24-hour clock, halves allowed). Bookings overlap freely and arrive in no particular order.

Produce the room's busy blocks: merge every group of bookings that overlap or touch (one ending exactly when another starts counts as one block) into a single start/end row, sorted by start time. Every booking ends after it starts. The grader swaps in booking lists of different lengths, so cover the whole OUTPUT range: empty input rows must produce empty output rows.

Work on it

  1. Make a copy of the template — it becomes your private sheet.
  2. Solve it however you like — helper columns and extra tabs are fair game. The one rule: the grader swaps INPUT for other datasets, so never put your own content inside INPUT.
  3. Check yourself against the expected sample output shown in your copy (and below).
  4. Submit below — Share → "anyone with the link, Viewer", paste the link. Your sheet is graded against 3 hidden datasets, so hardcoded answers won't survive.

Sample

Input (Input!B2:C22)

StartEnd
910.5
1012
1314
13.515
1617
9.510
14.7515.25

Expected output (Answer!B3:C22)

StartEnd
912
1315.25
1617