Tag: c++
Given a string s containing balanced parentheses “(” and “)”, split them into the maximum number of balanced groups. Constraints n ≤ 100,000 where n is length of s. …
Given a two-dimensional integer list intervals of the form representing intervals (inclusive), return their intersection, that is, the interval that lies within all of the given intervals. You can …
Given a list of strings words and a string letters, return the length of longest string in words that can be made from letters in letters. If no word …
You are given a list of integers seats containing 1s and 0s. Each element seats represents a seat and is either occupied if seats = 1 or empty if …
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. …