标签: greedy-algorithm
-
leetcode452-Minimum-Number-of-Arrows-to-Burst-Balloons
There are a number of spherical balloons spread in two-…
-
leetcode421-Maximum-XOR-of-Two-Numbers-in-an-Array
Given a non-empty array of numbers, a0, a1, a2, … , an-…
-
leetcode435-Nonoverlapping-Intervals
使用二维数组表示区间组,每一个子数组的第一个值表示区间的开始坐标,第二个值表示区间的结束坐标。计算最少进行多少…
-
leetcode406. Queue Reconstruction by Height
假设有一组人站成一堆,每个人都记录下了自己的高度,以及在自己前面有多少个不比自己矮的人。现在请按照这个信息将这…
-
leetcode402. Remove K Digits
直观的来说,删除数字得到最小的数字意味着我们应当尽可能的将越小的数字保留在高位,因此当我们从左往右遍历时,一旦…
-
[LeetCode] 767. Reorganize String
Given a string S, check if the letters can be rearrange…
-
leetcode330. Patching Array
假设有一个有序的正整数数组nums和一个整数n,最少添加几个元素到这个数组中,使得从1-n的所有整数都可以由这…