aboutsummaryrefslogtreecommitdiff
path: root/other/palindrome_number.rs
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-06-27 12:23:02 -0600
committerJack Sangdahl <[email protected]>2025-06-27 12:23:02 -0600
commita96b65cbfad7f62f3db6b2eab105e4e25c0414c5 (patch)
treee2a2b3f49f9fb741be81415266ac93e74cff42ec /other/palindrome_number.rs
parent694ad5ed71edcb1deccab54b72d706b779918276 (diff)
downloadleetcode-a96b65cbfad7f62f3db6b2eab105e4e25c0414c5.tar.gz
leetcode-a96b65cbfad7f62f3db6b2eab105e4e25c0414c5.zip
chore: remove old cpp and rust solutions
Diffstat (limited to 'other/palindrome_number.rs')
-rw-r--r--other/palindrome_number.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/other/palindrome_number.rs b/other/palindrome_number.rs
deleted file mode 100644
index bd3c641..0000000
--- a/other/palindrome_number.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-struct Solution;
-
-impl Solution {
- fn is_palindrome(mut x: i32) -> bool {
- if x < 0 {
- return false;
- }
- let mut nums = Vec::with_capacity(10);
- while x != 0 {
- nums.push(x % 10);
- x /= 10;
- }
- for i in 0..(nums.len() / 2) {
- if nums[i] != nums[nums.len() - i - 1] {
- return false;
- }
- }
- true
- }
-}
-
-fn main() {
- print!("{}", Solution::is_palindrome(121));
-}