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/power_of_four.rs | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 other/power_of_four.rs (limited to 'other/power_of_four.rs') diff --git a/other/power_of_four.rs b/other/power_of_four.rs deleted file mode 100644 index f20335f..0000000 --- a/other/power_of_four.rs +++ /dev/null @@ -1,24 +0,0 @@ -//INCOMPLETE -struct Solution; - -impl Solution { - pub fn is_power_of_four(num: i32) -> bool { - if num < 0 { - return false; - } - let (ans, pos, ones) = (0, 1, 0); - while num { - if num & 1 { - ans += 1; - ones = pos; - } - num >>= 1; - pos += 1; - } - ans == 1 && ones & 1 - } -} - -fn main() { - print!("{}", Solution::is_power_of_four(16)); -} -- cgit v1.2.3