码迷,mamicode.com
首页 >  
搜索关键字:assume    ( 1858个结果
Leetcode: Compare Version Numbers
Compare two version numbers version1 and version1. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0. You may assume that the version strings are non-empty and co...
分类:其他好文   时间:2015-01-10 16:40:07    阅读次数:135
【leetcode】Majority Element (easy)(*^__^*)
Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the arr...
分类:其他好文   时间:2015-01-09 23:37:59    阅读次数:226
[leetcode] Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume...
分类:其他好文   时间:2015-01-09 18:46:57    阅读次数:151
【leetcode】Insert Interval
Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals...
分类:其他好文   时间:2015-01-09 16:59:30    阅读次数:133
[C++]LeetCode: 80 Find Minimum in Rotated Sorted Array
题目: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may assume no duplicate exi...
分类:编程语言   时间:2015-01-09 12:42:03    阅读次数:253
LeetCode--3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact...
分类:其他好文   时间:2015-01-09 09:19:26    阅读次数:176
[LeetCode#98]Validate Binary Search Tree
The problem:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node con...
分类:其他好文   时间:2015-01-09 00:07:50    阅读次数:208
Java-Majority Element
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times. You may assume that the array is non-empty and the majority element al...
分类:编程语言   时间:2015-01-08 18:09:44    阅读次数:157
[LeetCode#106]Construct Binary Tree from Inorder and Postorder Traversal
The problem:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.My...
分类:其他好文   时间:2015-01-08 13:15:07    阅读次数:109
[LeetCode#105]Construct Binary Tree from Preorder and Inorder Traversal
The problem:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.My ...
分类:其他好文   时间:2015-01-08 12:54:39    阅读次数:97
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!