Tag: math
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a singly linked list l0 and another linked list l1, each representing a number with least significant digits first, …
Given an unsorted array of integers nums, find the length of the longest sequence of consecutive elements. Constraints n ≤ 100,000 where n is the length of nums Example …
You are given a string s containing “1”s and “0”s. Return the number of substrings that contain only “1”s. Mod the result by 10 ** 9 + 7. Constraints …
You are given a list of integers nums. Return the number of pairs i < j such that nums = nums. Constraints 0 ≤ n ≤ 100,000 where n …
You are given an array rectangles where rectangles = represents the ith rectangle of length li and width wi. You can cut the ith rectangle to form a square …