Tag: math
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 …
You are given a string s of “a” and “b”s. “a”s can stay “a” or turn into “b”, but “b”s can’t change. Return the number of unique strings that …
You are given a list blocks where each block contains two integers where start < end. You can join two blocks if the end of one is equal to …
Teaching Kids Programming: Videos on Data Structures and Algorithms Implement pow(x, n), which calculates x raised to the power n (i.e. xn). Example 1: Input: x = 2.00000, n = …
Given a list of integers nums and an integer k, return whether there are four distinct elements in the list that add up to k. Constraints n ≤ 100 …