CODENATION (TRILOGY) | On-Campus OA (2021) | Minimum Arrows Required to Burst Overlapping Balloons

CodeNation · Question · Posted Jun 2026

Problem Statement There are several balloons spread on a 2D plane. Each balloon is represented by an interval: [xstart, xend] where: xstart = starting x-coordinate of the balloon's diameter. xend = ending x-coordinate of the balloon's diameter. An arrow can be shot vertically at any x-coordinate. A balloon bursts if the arrow passes through its interval. Find the minimum number of arrows required to burst all balloons. Example 1 Input: points = [[10,16],[2,8],[1,6],[7,12]] Output: 2 Explanation One arrow at: x ...

The full answer & interview discussion are available to premium members.

Log in Create a free account