1.
Palindrome Number (Easy)
Given an integer x
, return true
if x
is a palindrome, and false
otherwise.
2.
Plus One (Easy)
You are given a large integer represented as an integer array digits
, where each digits[i]
is the i
th digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0
's.
Increment the large integer by one and return the resulting array of digits.
3.
Sqrt(x) (Easy)
Given a non-negative integer x
, return the square root of x
rounded down to the nearest integer. The returned integer should be non-negative as well.
You must not use any built-in exponent function or operator. For example, do not use pow(x, 0.5)
in c++ or x ** 0.5
in python.
4.
Factorial Trailing Zeroes (Medium)
Given an integer n
, return the number of trailing zeroes in n!
.
Note that n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1
.
5.
Pow(x, n) (Medium)
Implement pow(x, n)
, which calculates x
raised to the power n
(i.e. x^n
).