Tag: math
Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of 1 to n in order, modulo 10^9 + 7. Example …
Given an integer n, return whether it is equal to the sum of its own digits raised to the power of the number of digits. Example 1 Input n …
Teaching Kids Programming: Videos on Data Structures and Algorithms Greate Common Divisor Algorithm GCD aka Greatest Common Disvisor is the largest common divisor of two positive integers. For example, …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a positive integer num, return the sum of its digits. Bonus: Can you do it without using strings? Constraints …
Teaching Kids Programming: Videos on Data Structures and Algorithms The factorial of a number n is defined as n! = n * (n – 1) * (n – 2) …