码迷,mamicode.com
首页 >  
搜索关键字:assume    ( 1858个结果
LeetCode Insert Interval
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially...
分类:其他好文   时间:2015-01-31 00:03:18    阅读次数:165
Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. #include #include typedef struct TreeNode { int v...
分类:其他好文   时间:2015-01-30 22:50:28    阅读次数:266
LeetCode --- 16. 3Sum Closest
题目链接: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...
分类:其他好文   时间:2015-01-30 22:42:30    阅读次数:252
面试中常见算法1
Problem 1 : Is it a loop ? (判断链表是否有环?)Assume that wehave a head pointer to a link-list. Also assumethat we know the list is single-linked. Can you com...
分类:编程语言   时间:2015-01-30 20:53:04    阅读次数:307
[LeetCode]169.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 majorit...
分类:其他好文   时间:2015-01-30 17:48:21    阅读次数:153
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-29 19:36:35    阅读次数:168
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 e...
分类:其他好文   时间:2015-01-29 17:41:59    阅读次数:167
LeetCode—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 ...
分类:其他好文   时间:2015-01-29 16:05:16    阅读次数:164
汇编语言的段的最大和最小
转自《汇编语言》论坛这儿争论有什么意思,做个实验测试一下就可以了,最大是64K应该没有人反对吧 那就是最小了,有的说0 byte, 有的说16Bytes, 有的说其他的,那到底是多少,我们看这个程序assume cs:code, ds:datadata segment data endscode s...
分类:编程语言   时间:2015-01-29 11:53:48    阅读次数:229
Insert Interval
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially...
分类:其他好文   时间:2015-01-28 11:05:10    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!