![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
小菜鸟_爱树蛙
这个作者很懒,什么都没留下…
展开
-
Maximum Subarray-最大连续子数组和
Maximum Subarray原创 2014-11-11 16:56:25 · 632 阅读 · 0 评论 -
二分查找
1.递归版本 int binarySearch(int a[],int low,int high,int x){ if(low>high)return -1; int mid=(low+high)/2; if(a[mid]==x)return mid; if(a[mid>x]){ return binarySearch(a,low,mid-1,x)原创 2014-11-13 16:52:40 · 438 阅读 · 0 评论 -
LeetCode--------Merge Two Sorted Lists
【题目】 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 【答案】 1.解法一:最麻烦的有两点: 1)l1、l2理解成数据没有意义的头结点还原创 2015-01-07 15:51:45 · 451 阅读 · 0 评论 -
Same Tree
【题目】 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value.原创 2015-01-02 21:12:58 · 447 阅读 · 0 评论