From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/min_num_arrow_balloon.rs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 other/min_num_arrow_balloon.rs (limited to 'other/min_num_arrow_balloon.rs') diff --git a/other/min_num_arrow_balloon.rs b/other/min_num_arrow_balloon.rs deleted file mode 100644 index 6204bfe..0000000 --- a/other/min_num_arrow_balloon.rs +++ /dev/null @@ -1,20 +0,0 @@ -struct Solution; - -impl Solution { - pub fn find_min_arrow_shots(mut points: Vec>) -> i32 { - points.sort_unstable_by(|a, b| a[1].cmp(&b[1])); - let (mut arrows, mut target) = (0, points[0][1]); - for p in points { - if p[0] > target && p[1] > target { - arrows += 1; - target = p[1]; - } - } - arrows + 1 - } -} - -fn main() { - let points = vec![vec![10,16],vec![2,8],vec![1,6],vec![7,12]]; - println!("{}", Solution::find_min_arrow_shots(points)); //expect: 2 -} -- cgit v1.2.3