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...
分类:
其他好文 时间:
2014-08-16 11:12:43
阅读次数:
317
23种设计模式设计模式- 可复用面向对象软件的基础Design Patterns- Elements of Reusable Object-Oriented Software一、前言 使用设计模式的根本原因是为了代码复用,增加可维护性。 设计模式是前辈们在做各种优化时的运用总结,其实本质上是没有.....
分类:
其他好文 时间:
2014-08-15 23:40:19
阅读次数:
224
Given an integer n, generate a square matrix filled with elements from 1 to n2 in
spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[...
分类:
其他好文 时间:
2014-08-15 22:37:39
阅读次数:
274
1,在基类ApplicationController里面定义 模板页Layout需要使用的ViewModel【实际逻辑已经实现,这里不显示代码】直接上图2,在Views-->Shared 文件夹右键 新建 部分试图 命名为 _TopMenuVModel在顶部 引入 模型下面 写入 你的对应 页面 ....
分类:
Web程序 时间:
2014-08-15 22:24:19
阅读次数:
314
hadoop yarn里用了RPC调用。NM里面文件本地化类ContainerLocalizer用RPC心跳方式跟本机的ResourceLocalizationService通信。用shared memory还要调到native层去,不知道会不会比tcp/ip快?可以用文件,考虑锁的问题。但是文件貌...
分类:
其他好文 时间:
2014-08-15 22:22:39
阅读次数:
220
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....
分类:
其他好文 时间:
2014-08-15 21:08:29
阅读次数:
212
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty s...
分类:
其他好文 时间:
2014-08-15 19:39:39
阅读次数:
222
题目:
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 to hold additional elements from B. The number of elements initia...
分类:
其他好文 时间:
2014-08-15 18:00:09
阅读次数:
194
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-08-15 17:18:39
阅读次数:
177
Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[...
分类:
其他好文 时间:
2014-08-15 17:17:29
阅读次数:
176