Skip to content

AdaGold/integer-palindrome-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Integer Palindrome Check

Check if the digits in a non-negative integer form a palindrome.

Exercise

  • Design and implement a method that checks if the digits in the input positive integer forms a palindrome. The method returns true if the digits in the input form a palindrome. The method returns false otherwise.
  • For example,
    • 12521 and 4554 are palindromes.
    • 326725 is not a palindrome.
  • Share and explain the time and space complexities for your solution in the comments above the method implementation.
    • If you describe the complexity in terms of n, be sure to explain what n stands for.
  • If you think of multiple approaches to solve the problem, implement the solution which minimizes space complexity. Explain the other approaches, and your decision in comments above the code.

Note: Do not use Ruby provided functions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages