Category: algorithms
Teaching Kids Programming: Videos on Data Structures and Algorithms We analyse an algorithm for its complexity in terms of runtime and the space allocated. Algorithms can be compared by …
Given two integers num and k, return the largest product of k contiguous digits in num. Note: num is guaranteed to have >= k digits. Example 1 Input num …
Given a string s and an integer n, rearrange s into n rows so that s can be read vertically (top-down, left to right). Constraints Length of s ≤ …
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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms Yesterday, we talked about the Breadth First Search Algorithm. We are solving the same Jump Game problem today by using …