码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
LeetCode:Same Tree
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 n...
分类:其他好文   时间:2014-06-19 12:49:17    阅读次数:301
Maximum Subarray
题目 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous subarray [4,...
分类:其他好文   时间:2014-06-19 12:08:20    阅读次数:270
LeetCode——Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2014-06-19 11:23:05    阅读次数:204
LeetCode ---- Merge Sorted Array
题目链接Problem discriptionGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size t...
分类:其他好文   时间:2014-06-16 11:12:36    阅读次数:192
1.1.4 Getting Started_Budding Your First App_Starting Another Activity
AnIntentis an object that provides runtime binding between separate components (such as two activities). Theintentrepresents an app’s "intent to do so...
分类:移动开发   时间:2014-06-16 10:00:27    阅读次数:248
Leetcode: Merge k Sorted List
参看别人的思路,类似MergeSort的思路,思路是先分成两个子任务,然后递归求子任务,最后回溯回来。这个题目也是这样,先把k个list分成两半,然后继续划分,直到剩下两个list就合并起来,合并时会用到Merge Two Sorted Lists这道题。 1 /** 2 * Definition....
分类:其他好文   时间:2014-06-16 08:26:57    阅读次数:150
[leetcode]Gray Code @ Python
原题地址:https://oj.leetcode.com/problems/gray-code/题意:The gray code is a binary numeral system where two successive values differ in only one bit.Given a...
分类:编程语言   时间:2014-06-16 07:42:27    阅读次数:242
Leetcode:Swap Nodes in Pairs 链表成对交换节点
Swap Nodes in Pairs:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2...
分类:其他好文   时间:2014-06-13 17:04:27    阅读次数:180
Leetcode:Path Sum 二叉树路径和
Path Sum:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the giv...
分类:其他好文   时间:2014-06-13 16:09:02    阅读次数:237
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!