LeetCode 258: Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321.
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb.
Determine whether an integer is a palindrome. Do this without extra space.