![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
Irisohohoh
这个作者很懒,什么都没留下…
展开
-
二分法查找元素位置
题目描述(leetcode35): 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 你可以假设数组中无重复元素。 我的代码: public int searchInsert(int[] nums, int target) { if(nums==null) return -1; if...原创 2019-11-08 13:49:11 · 678 阅读 · 0 评论 -
动态规划——leetcode股票买卖总结
原作者:labuladong 链接:https://leetcode-cn.com/problems/two-sum/solution/yi-ge-fang-fa-tuan-mie-6-dao-gu-piao-wen-ti-by-lab/ 来源:力扣(LeetCode) 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 一、穷举框架 首先,还是一样的思路:如何穷举?这里的穷举思...转载 2019-08-11 21:06:17 · 382 阅读 · 0 评论