摘要:
作为log(n) search 方法的典型, Binary Search基本可以分为以下几类 下面逐个解说: 1. 准确number, 这个比较简单,就是可以分为3中情况,mid等于,mid小于,mid大于。不赘述,具体code如下 几个典型的题为 2. 3. First Bad Version. 阅读全文
摘要:
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文