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/earliest_possible_full_bloom.rs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 other/earliest_possible_full_bloom.rs (limited to 'other/earliest_possible_full_bloom.rs') diff --git a/other/earliest_possible_full_bloom.rs b/other/earliest_possible_full_bloom.rs deleted file mode 100644 index b8e6444..0000000 --- a/other/earliest_possible_full_bloom.rs +++ /dev/null @@ -1,20 +0,0 @@ -struct Solution; - -impl Solution { - pub fn earliest_full_bloom(plant_time: Vec, grow_time: Vec) -> i32 { - let n = plant_time.len(); - let mut plant_data: Vec<(i32, i32)> = plant_time.into_iter().zip(grow_time.into_iter()).collect(); - plant_data.sort_by(|a,b| b.1.cmp(&a.1)); - let (mut free_time, mut max_bloom_time) = (0,0); - for i in 0..n { - free_time += plant_data[i].0; - max_bloom_time = max_bloom_time.max(free_time + plant_data[i].1); - } - max_bloom_time - } -} - -fn main() { - let (plant_time, grow_time) = (vec![1,4,3], vec![2,3,1]); - print!("{}", Solution::earliest_full_bloom(plant_time, grow_time)); -} -- cgit v1.2.3