Teaching Kids Programming: Videos on Data Structures and Algorithms Math Induction is a powerful tool that allows us to prove the correctness of a formula (Proposition). To do this, …
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 …
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 binary tree root, repeatedly delete all leaves that have even values. That is, if after deletions, a node becomes a leaf with an even value, it too …
Teaching Kids Programming: Videos on Data Structures and Algorithms BFS (Breadth First Search) is one of the most classic algorithms in Computer Science. Given an array of non-negative integers …