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/perfect_squares.rs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 other/perfect_squares.rs (limited to 'other/perfect_squares.rs') diff --git a/other/perfect_squares.rs b/other/perfect_squares.rs deleted file mode 100644 index 3887e40..0000000 --- a/other/perfect_squares.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::cmp::min; -struct Solution; - -impl Solution { - pub fn num_squares(n: i32) -> i32 { - let mut dp: Vec = vec![std::i32::MAX; n as usize + 1]; - dp[0] = 0; - for i in 1..(n as usize + 1) { - let mut j: usize = 1; - while j * j <= i { - dp[i] = min(dp[i], dp[i - j * j] + 1); - j += 1; - } - } - dp[n as usize] - } -} - -fn main() { - print!("{}", Solution::num_squares(12)); -} -- cgit v1.2.3