Tag: math
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 …
Teaching Kids Programming: Videos on Data Structures and Algorithms Proof of Pythagorean Theorem The big square’s area is and it is equal to 4 triangls + a small square. …