码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
Convert Sorted List to Binary Search Tree leetcode java
题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题解:之前做过一道是从sorted array转换到BinarySearc....
分类:编程语言   时间:2014-08-01 04:54:21    阅读次数:310
LeetCode 第一题,Two Sum
题目还原 Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up t...
分类:其他好文   时间:2014-08-01 02:25:11    阅读次数:391
Leetcode--Remove Duplicates from Sorted Array
Problem Description: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you ...
分类:其他好文   时间:2014-08-01 00:08:50    阅读次数:274
Leetcode 线性表 Swap Nodes in Pairs
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlieSwap Nodes in PairsTotal Accepted:12511Total Submissions:39302Given a linked list, swap every two...
分类:其他好文   时间:2014-07-31 23:26:40    阅读次数:307
[leetcode]Convert Sorted Array to Binary Search Tree
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.算法:根据有序数组,生...
分类:其他好文   时间:2014-07-31 23:20:00    阅读次数:270
[leetcode]Same Tree
Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide...
分类:其他好文   时间:2014-07-31 23:15:00    阅读次数:201
cocoa foundation笔记-2
//数组的创建? ????NSArray?*array1?=?[NSArray?arrayWithObject:@"one"]; ????NSArray?*array2?=?[NSArray?arrayWithObjects:@"one",?@"two",?nil]; ????NSArray?*array3?=?[...
分类:其他好文   时间:2014-07-31 21:22:47    阅读次数:225
Uva10290 - {Sum+=i++} to Reach N
Problem H {sum+=i++} to Reach N Input: standard input Output:  standard output Memory Limit: 32 MB   All the positive numbers can be expressed as a sum of one, two or more consecutive positive i...
分类:其他好文   时间:2014-07-31 20:58:37    阅读次数:199
Balanced Binary Tree(Java代码没过,什么原因???)
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-07-31 20:55:47    阅读次数:197
Leetcode--Two Sum
Problem Description: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they...
分类:其他好文   时间:2014-07-31 20:48:17    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!