Leetcode 452. Minimum Number of Arrows to Burst Balloons

Input: points = [[10,16],[2,8],[1,6],[7,12]]
Output: 2
Explanation: The balloons can be burst by 2 arrows:
- Shoot an arrow at x = 6, bursting the balloons [2,8] and [1,6].
- Shoot an arrow at x = 11, bursting the balloons [10,16] and [7,12].
Input: points = [[1,2],[3,4],[5,6],[7,8]]
Output: 4
Explanation: One arrow needs to be shot for each balloon for a total of 4 arrows.
Input: points = [[1,2],[2,3],[3,4],[4,5]]
Output: 2
Explanation: The balloons can be burst by 2 arrows:
- Shoot an arrow at x = 2, bursting the balloons [1,2] and [2,3].
- Shoot an arrow at x = 4, bursting the balloons [3,4] and [4,5].

--

--

--

CS new grad, 6 years experience related to supply chain management. Located in Bay area

Love podcasts or audiobooks? Learn on the go with our new app.

Klaydice — Paving the Path in P2E?

From Java to Kotlin and back (III): Calling Java from Kotlin

Free NFT gift to friends, more friends more rewards

Creational Design Pattern: Singleton

Leetcode 973. K Closest Points to Origin

Here’s Why Magento to BigCommerce Migration Is Worth Considering In 2020 [+Tutorial]

Bella Protocol x Clover | Building Polkadot-Based Defi Infrastructure

Approaches To Problem Solving #10(Heaps | Sliding Window)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gary Chiang

Gary Chiang

CS new grad, 6 years experience related to supply chain management. Located in Bay area

More from Medium

Leetcode 862. Shortest Subarray with Sum at Least K

Count Binary Substrings

Two sum Leetcode problem solution

Minimum cost to reach the top