Minimum Number of Arrows to Burst Balloons
Recognize the pattern
Brute force idea
A straightforward first read of Minimum Number of Arrows to Burst Balloons is this: Try all arrow positions. Test every possible x-coordinate. That instinct is useful because it follows the prompt literally, but it usually keeps revisiting work the problem is begging you to organize.
Better approach
A calmer way to see Minimum Number of Arrows to Burst Balloons is this: Sort by end coordinate. Shoot at each balloon's end. Skip all balloons that overlap with this shot. Count arrows. The goal is not to be clever for its own sake, but to remember the one relationship that keeps the solution grounded as you move forward.
Key invariant
The truth you want to protect throughout Minimum Number of Arrows to Burst Balloons is this: Shooting at a balloon's end maximizes the chance of hitting overlapping balloons to the right. If the next balloon starts after the shot, it needs a new arrow. If that remains true after every update, the rest of the reasoning has a stable place to stand.
Watch out for
The trap in Minimum Number of Arrows to Burst Balloons usually looks like this: Sorting by start instead of end — end-sorting ensures the greedy choice covers the maximum number of subsequent overlapping balloons. When the code becomes mechanical before the idea is clear, small edge cases start breaking the whole story.