A Rubik cube usually have 6 sides. Take 3×3 rubik cube for example, each side has 9 little squares (1×1), 4 medium squares (2×2) and 1 big square (3×3). …
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? …
The sum of the squares of the first ten natural numbers is, 1^2+2^2+3^2+…10^2=385 The square of the sum of the first ten natural numbers is, (1+2+…+10)^2=55^2=3025 Hence the difference …
Given a number s in their binary representation. Return the number of steps to reduce it to 1 under the following rules: If the current number is even, you …
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path …
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome …