Tag: c++
Given a positve integer n, find the length of its Collatz sequence. The Collatz sequence is generated sequentially where: n = n / 2 if n is even n …
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 a list of integers nums, return whether there’s two numbers such that one is a triple of another. Constraints n ≤ 100,000 where n is the length of …
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 …
Given a binary tree root, return the leftmost node’s value on each level of the tree. Constraints n ≤ 100,000 where n is the number of nodes in root …