class Solution {
func findMinArrowShots(_ points: [[Int]]) -> Int {
var arrows: Int = 1
var sortedArray = points.sorted(by: {$0[1] < $1[1]})
var prev = sortedArray[0]
for range in sortedArray {
if prev[1] < range[0] {
arrows += 1
prev = range
}
}
return arrows
}
}