Tag: math
Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, …
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: …
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. …
Given a time in the format of hour and minute, calculate the angle of the hour and minute hand on a clock. This was recently asked by Microsoft. This …
On a N * N grid, we place some 1 * 1 * 1 cubes. Each value v = grid represents a tower of v cubes placed on top …