码迷,mamicode.com
首页 >  
搜索关键字:assume    ( 1858个结果
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...
分类:其他好文   时间:2015-03-13 12:44:23    阅读次数:139
【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 always exist in the array....
分类:其他好文   时间:2015-03-13 00:26:46    阅读次数:204
LeetCode Majority Element
1.题目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-03-12 20:53:53    阅读次数:109
【LeetCode从零单排】No.169 Majority Element(hashmap用法)
题目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 alwa...
分类:其他好文   时间:2015-03-12 11:31:13    阅读次数:132
LeetCode16——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 exactly...
分类:其他好文   时间:2015-03-12 00:59:44    阅读次数:113
[LeetCode]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-03-11 23:30:19    阅读次数:242
LeetCode——Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2015-03-11 21:29:40    阅读次数:112
leetcode_98_Validate Binary Search Tree
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢 98 Validate Binary Search Tree Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree o...
分类:其他好文   时间:2015-03-11 14:58:29    阅读次数:122
Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Examp...
分类:其他好文   时间:2015-03-10 21:27:41    阅读次数:134
Sudoku Solver
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 ...
分类:其他好文   时间:2015-03-10 16:47:03    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!