Tag: algorithm
Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown: Example …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a list of integers nums, find the largest product of two distinct elements. Constraints n ≤ 100,000 where n …
The product sum of two equal-length arrays a and b is equal to the sum of a * b for all 0 <= i < a.length (0-indexed). For example, …
Let’s design a data stream that takes a bit either 1 or 0, and then returns true/false to indicate that the integer (constructed by the bits so far) is …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given an array of numbers and a target, find out if there is any three numbers that sum up to …