Category: math
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 …
Catalan numbers are popular in Combinatoric Mathematics. Many interesting counting problems tend to be solved using the Catalan numbers. The first few Catalan numbers are: 1, 1, 2, 5, …
Given an integer number n, return the difference between the product of its digits and the sum of its digits. Example 1: Input: n = 234 Output: 15 Explanation: …
Given a 2D grid of size n * m and an integer k. You need to shift the grid k times. In one shift operation: Element at grid becomes …