BCG interview question
BCG online assessment: intervals and sorting
- Company:
- BCG
- Round:
- Online assessment
- Type:
- Coding
- Difficulty:
- Medium
- Reported:
- October 19, 2026
Problem
Study note: intervals and sorting
Interval problems describe ranges with a start and an end and ask how they overlap, combine or fit together. Sorting is almost always the first step, because it turns pairwise comparisons into one ordered scan.
General approach
- Sort by start time for merging problems, or by end time for selection problems, and process in that order.
- Keep only the state the scan needs, such as the end of the current merged block.
- Count the cost: sorting dominates at O(n log n), and the scan afterwards is linear.
How to practise
Work through merging intervals, inserting an interval into a sorted list, and removing the fewest intervals so the rest do not overlap; time each attempt and explain its complexity.
Reported by candidates or drawn from publicly available sources, and rewritten in our own words. Pathwise Prep does not publish confidential assessment content. Report a concern