Leetcode, Scala, Palindrome Number, Programming, Technical Interview.
reduce the problem size by a constant factor with each iteration. Since we’re peeling off and reversing digits one at a time until the original number is depleted, the time to process the number scales logarithmically with the number of digits n. Hence, the time complexity is O(log n). Space