贪心
455. Assign Cookies
Difficulty: Medium
Tags: Greedy Two Pointers
排序 若孩子的胃口大于饼干 则判断下一个饼干 若到了无饼干符合(j==n)则结束
1 | class Solution { |
435. Non-overlapping Intervals
Difficulty: Medium
1 | --wait |
605. Can Place Flowers
Difficulty: Easy
跳格子法
1 | class Solution { |
- Title: 贪心
- Author: Jason
- Created at : 2023-09-09 14:09:39
- Updated at : 2023-09-10 16:01:33
- Link: https://xxxijason1201.github.io/2023/09/09/LeetCode/贪心/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments