码迷,mamicode.com
首页 >  
搜索关键字:elements    ( 4737个结果
[LeetCode#99]Recover Binary Search Tree
The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(...
分类:其他好文   时间:2015-01-09 06:54:36    阅读次数:132
【leetcode】Spiral Matrix II
Spiral Matrix IIGiven an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the...
分类:其他好文   时间:2015-01-08 21:32:10    阅读次数:209
LeetCode: Subsets 解题报告
SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set mus...
分类:其他好文   时间:2015-01-08 21:27:08    阅读次数:361
Jquery empty() remove() detach() 方法的区别
方法简介: empty()This method removes not only child (and other descendant) elements, but also any text within the set of matched elements. This is because...
分类:Web程序   时间:2015-01-08 14:37:27    阅读次数:378
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 fro...
分类:其他好文   时间:2015-01-08 09:43:18    阅读次数:169
[LeetCode#108]Convert Sorted Array to Binary Search Tree
The problem:Given an array where elements are sorted in ascending order, convert it to a height balanced BST.My analysis:The recursion is the best way...
分类:其他好文   时间:2015-01-08 00:49:30    阅读次数:265
【leetcode】Spiral Matrix
Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[...
分类:其他好文   时间:2015-01-08 00:45:10    阅读次数:245
(中等) UESTC 94 Bracket Sequence,线段树+括号。
There is a sequence of brackets, which supports two kinds of operations.we can choose a interval [l,r], and set all the elements range in this inter.....
分类:其他好文   时间:2015-01-07 20:30:57    阅读次数:178
java-Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2,...
分类:编程语言   时间:2015-01-07 16:52:23    阅读次数:141
LeetCode: Recover Binary Search Tree 解题报告
Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A sol...
分类:其他好文   时间:2015-01-07 14:40:01    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!