摘要:
正常实现 Input : [1,2,3,4,5] key : 3 return the index : 2 public int binarySearch(int[] nums, int key) { int l = 0, h = nums.length - 1; while (l <= h) { 阅读全文
posted @ 2020-04-09 21:32
小仙女学编程
阅读(127)
评论(0)
推荐(0)
摘要:
保证每次操作都是局部最优的,并且最后得到的结果是全局最优的。 1. 分配饼干 455. Assign Cookies (Easy) class Solution { public int findContentChildren(int[] g, int[] s) { if(g.length == 0 阅读全文
posted @ 2020-04-09 20:55
小仙女学编程
阅读(168)
评论(0)
推荐(0)

浙公网安备 33010602011771号