【leetcode】【Easy】【455. Assign Cookies】【greedy】

problem link


code:

public class Solution {
    public int findContentChildren(int[] g, int[] s) {
        Arrays.sort(g);
        Arrays.sort(s);
        
        int num=0;
        for(int i=0,j=0;i


你可能感兴趣的:(LeetCode_Easy)