You are given a 2D integer array points where points[i] = [xstart, xend] represents the horizontal diameter of a spherical balloon. You are shooting arrows vertically upwards from the x-axis.
An arrow shot at position x on the x-axis will burst any balloon whose xstart <= x <= xend. A single arrow can burst multiple balloons if their horizontal diameters overlap with the arrow's path.
Your task is to find the minimum number of arrows that must be shot to burst all the balloons.
Input Format:
The first line of input contains an integer 'N', the number of balloons.
The next 'N' lines each contain two space-separated integers, x_start and x_end.
Output Format:
Print a single integer representing the minimum number of arrows required.
Note:
A key insight to solve this problem greedily is to sort the balloons. Sorting by the end coordinate (x_end) is a highly effective strategy.