Tag: math
If you want to solve the following puzzle then it may be not so easy/intuitive at a glance. It is a square and 20 is the area with e.g. …
We all know what rubik cubes. For example, here is a 2×2 rubik cubes and here is a 3×3 rubik cubes. The number of squares of a side for …
Most people requires mortgage to purchase a house (property). You borrow money from the bank and promise to pay back (with interests) within a specified periods e.g. 25 years. …
Given an index k, return the k-th row of the Pascal’s triangle. For example, given k = 3, Return . Could you optimize your algorithm to use only O(k) …
Given an integer n, return the number of trailing zeroes in Factorial N! Your solution should be in logarithmic time complexity. Naive/Bruteforce Solution It is easy to get the …