码迷,mamicode.com
首页 >  
搜索关键字:assume    ( 1858个结果
leetcode.16----------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-02-03 09:33:14    阅读次数:96
169.Majority Element (法1排序法2多数投票)
Given an array of size n, find the majority element. Themajority element is the element that appears more than ? n/2 ? times. You may assume that the array is non-empty and the majority element alwa...
分类:编程语言   时间:2015-02-02 23:15:34    阅读次数:255
LeetCode:Merge Sorted Array
Given 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 that is greater or equal to m + n) to hold additional elements from B....
分类:其他好文   时间:2015-02-02 23:12:19    阅读次数:171
LeetCode Sudoku Solver
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on...
分类:其他好文   时间:2015-02-02 22:49:09    阅读次数:234
[LeetCode]165.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-em...
分类:其他好文   时间:2015-02-02 21:32:15    阅读次数:102
关于汇编地址分配的疑惑
使用王爽著的《汇编语言》开始自己的汇编之旅,遇到一些疑惑,记录下来,看以后会不会解惑。 1 assume cs:codesg,ds:datasg 2 datasg segment 3 db 'ibm ' 4 db 'dec ' 5 db 'dos ...
分类:其他好文   时间:2015-02-02 17:19:35    阅读次数:147
【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...
分类:其他好文   时间:2015-02-01 16:08:38    阅读次数:202
[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-02-01 07:05:19    阅读次数:191
[LeetCode]153.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 ...
分类:其他好文   时间:2015-01-31 17:54:53    阅读次数:203
35.Search Insert Position
Given a sorted array and a target value, return the index if the target isfound. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. H...
分类:其他好文   时间:2015-01-31 12:51:27    阅读次数:98
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!