Valid Parenthesis String (LeetCode 678)
The problem You get a string of , and . Each can act as , as , or as nothing…
Tag
22 posts
The problem You get a string of , and . Each can act as , as , or as nothing…
The problem You get a list of tasks, each a capital letter, and a cooldown . The…
The problem You get an array of non-negative integers and an integer . Split…
The problem You get a string of lowercase letters. Rearrange its letters so…
The problem You get a non-negative integer as a string and an integer . Remove…
The problem You get a list of intervals . Interval is covered by if and…
The problem Given a string of lowercase letters, split it into as many parts as…
The problem Given a list of intervals , return the minimum number of intervals…
The problem Each balloon spans a horizontal range . An arrow shot straight up at…
The problem You get a list of triplets and a triplet. One operation picks two…
The problem You get an array of non-negative integers. Return the largest value…
The problem You start at index 0 of an array of non-negative integers. is the…
The problem You stand at index 0 of an array . From index you may jump forward…
The problem You hold a hand of cards, each with an integer value, and a number…
The problem There are stations on a circular road. Station gives you fuel…
The problem You get an array where is the height of a vertical wall at…
The problem Packages on a conveyor belt have weights and must be shipped in…
The problem Children stand in a line, each with a rating. Give out candies so…
The problem You get an array where is a stock’s price on day . You may buy…
The problem Each child has a greed factor : the smallest cookie size that makes…
Greedy is the most dangerous pattern: the code is short and obvious, which makes…
Eleven problems that drill the greedy pattern from Lesson 22. The real exercise…