O60

Minimum Number of Arrows to Burst Balloons

Mid / Senior Engineer
Target Time: 25 - 35 Minutes
Type: NUMERIC

Problem Statement & Objective

Find the minimum number of arrows that must be shot to burst all balloons given their x-intervals.

Function Signature (Python)

minimum_number_of_arrows_to(points: list[list[int]]) -> int

Input & Output Contract

Output Rule:Minimum ok sayısı (tam sayı).

System Constraints

1 <= noktalar.length <= 10^5
-2^31 <= x_baslangic < x_bitis <= 2^31 - 1

Example Execution Walkthrough

noktalar = [[10, 16], [2, 8], [1, 6], [7, 12]]
x = 6 oku [2, 8] ve [1, 6]'yı patlatır.
x = 11 oku [10, 16] ve [7, 12]'yi patlatır.
cevap: 2 ok

Example Test Scenarios (3)

Example 1
Input:[[[10,16],[2,8],[1,6],[7,12]]]
Expected Output:2
Example 2: Ayrık Balonlar
Input:[[[1,2],[3,4],[5,6],[7,8]]]
Expected Output:4
Example 3: Uç Uca Bitişik
Input:[[[1,2],[2,3],[3,4],[4,5]]]
Expected Output:2
Loading Python Editor...
Input Parameters
[
  [
    [
      10,
      16
    ],
    [
      2,
      8
    ],
    [
      1,
      6
    ],
    [
      7,
      12
    ]
  ]
]
Expected Output
2