Task Scheduler (LeetCode 621)
The problem You get a list of tasks, each a capital letter, and a cooldown . The…
Tag
19 posts
The problem You get a list of tasks, each a capital letter, and a cooldown . The…
The problem You get an integer array and an integer . Return the values that…
The problem You get an grid where is the elevation of that cell; the values…
The problem You get a string . Rearrange it so that characters appear in order…
The problem You get a string of lowercase letters. Rearrange its letters so…
The problem You get a grid of . You start at the top-left cell and want to reach…
The problem You get an undirected graph with nodes. Edge joins and succeeds…
The problem There are nodes labelled to . Each entry in is a directed edge…
The problem You get an array of linked lists, each sorted in ascending order…
The problem You get points on a 2-D plane. Connecting two points costs their…
The problem You get a list of stone weights. Each turn, take the two heaviest…
The problem You get an integer array and an integer . Return the kth largest…
The problem Design a class . It starts with the numbers in . Each call to adds…
The problem You get a list of points on a plane and an integer . Return the k…
The problem Design a class with two methods: adds a number from the stream…
The problem Design a simplified Twitter with four operations: : the user posts a…
The problem You get two arrays and , both sorted in non-decreasing order, and…
Eleven problems that drill heaps / top-K from Lesson 14. The one trick to burn…
When you need the biggest or smallest few — but not a full sort — a heap is the…