Skip to content

Instantly share code, notes, and snippets.

@codertcet111
Created March 29, 2024 15:01
Show Gist options
  • Save codertcet111/e13735547b2e9066f07f0ef229946e94 to your computer and use it in GitHub Desktop.
Save codertcet111/e13735547b2e9066f07f0ef229946e94 to your computer and use it in GitHub Desktop.
Leetcode 9: palindrom number
Leetcode 9: palindrom number
# @param {Integer} x
# @return {Boolean}
def is_palindrome(x)
str = x.to_s
str == str.reverse
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment