Leetcode day1

This commit is contained in:
2026-01-25 12:41:33 +05:30
parent 686d174f19
commit 245116d181
14 changed files with 168 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
An easy problem but with a common pitfall hence a tricky one.
The idea is to only check till half of the number and not full where rev*10 exceeds int's range for larger values
Two pointer method is quite verbose as we check equality from either side using two pointers and return false if there's a mismatch