Banja Lab / Benchmarks / Test
The same task, run on 28 models. Compare the outputs side by side, or open any one in a popup to inspect it.
Top result: claude-opus-4-8 (low reasoning) at 100.0% composite. Lowest: claude-opus-4-8 at 0.0%. 28 models compared on this task.
Implement a Python function `merge_intervals(intervals)` that takes a list of intervals, each given as a two-element list `[start, end]` with start <= end, and returns the minimal list of non-overlapping intervals that cover the same points, sorted by start. Rules: - Two intervals that overlap are merged into one. - Two intervals that only touch (the end of one equals the start of the next, for example [1, 2] and [2, 3]) are also merged, into [1, 3]. - The input may be in any order and may contain nested intervals (one fully inside another, for example [1, 5] containing [2, 3]). - An empty input returns an empty list. - Do not mutate the caller's input. Return new [start, end] lists. Use only the Python standard library. Write your solution to `solution.py`.