码迷,mamicode.com
首页 >  
搜索关键字:elements    ( 4737个结果
Lintcode: Partition Array
Given an array "nums" of integers and an int "k", Partition the array (i.e move the elements in "nums") such that, * All elements = k are moved to ...
分类:其他好文   时间:2015-04-02 06:38:14    阅读次数:172
The Similarities and Differences Between C# and Java -- Part 1(译)
原文地址目录介绍(Introduction)相似点(Similarities)编译单位(Compiled Units)命名空间(Namespaces)顶层成员(类型)(Top Level Elements(Types))基础类型(Basic Types)类(Classes)结构体(Structure...
分类:编程语言   时间:2015-04-01 17:26:44    阅读次数:300
leetcode || Spiral Matrix
problem: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ],...
分类:其他好文   时间:2015-04-01 11:26:55    阅读次数:109
【leetcode刷题笔记】Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题解:递归就可以了。Java代码如下: 1 /** 2 * Definition for binary ....
分类:其他好文   时间:2015-04-01 00:16:07    阅读次数:96
LeetCode OJ Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 之前在Sicily做过,就是实现一个AVL树了。 struct TreeNodeNew { int val; TreeNodeNew *left; Tr...
分类:其他好文   时间:2015-03-31 18:09:23    阅读次数:150
STL源码分析 # vector #
STL源码分析 # vector # 下面是一个使用vector的demo: #include #include using namespace std; int main() { /* ** To create a vector which contain 10 elements and the value ** of each element i...
分类:其他好文   时间:2015-03-31 18:03:36    阅读次数:160
leetcode之Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:其他好文   时间:2015-03-31 17:40:27    阅读次数:114
【leetcode】Remove Element (easy)
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:其他好文   时间:2015-03-31 17:29:00    阅读次数:100
LeetCode: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-03-30 21:11:03    阅读次数:115
[LeetCode] Subsets II
Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order....
分类:其他好文   时间:2015-03-30 18:18:11    阅读次数:113
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!