Tag: algorithm
Teaching Kids Programming: Videos on Data Structures and Algorithms Yesterday we talked about summing up the first N odd numbers, we know that the equation is N*N. Today, let’s …
You are given a list of integers nums, and want to make the values equal. Consider an operation where you pick an integer in the list and increment every …
When unit testing, you often want to assert two things are equal. This is common for maps (dictionaries), where you may have a return map and the expected one. …
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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms The factorial of a number n is defined as n! = n * (n – 1) * (n – 2) …