455.分发饼干 public class Solution {public int FindContentChildren(int[] g, int[] s) {Array.Sort(g);Array.Sort(s);int ans=0;int j=0;int i=0;while(i<g.Length){while(j>=s.Length){return ans;}if(g[i]<=s[j])
三道题全是关于重叠区间 435. 无重叠区间 代码随想录 class Solution {public int eraseOverlapIntervals(int[][] intervals) {Arrays.sort(intervals, (a, b) -> a[1] - b[1]);int ans = 0;int end = intervals[0][1];for (int