Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Could you devise a constant space solution?
思路:因为需要遍历整个矩阵,时间复杂度肯定需要O(m * n),对于空间复杂度而言,第一种是可以使用O(m * n),...
分类:
其他好文 时间:
2014-06-18 12:33:39
阅读次数:
167
??
Where Can the UML Be Used
The UML is intended primarily for software-intensive systems. It has been used effectively for such domains as
Enterprise information systems
Banking and financial ser...
分类:
其他好文 时间:
2014-06-18 11:53:00
阅读次数:
190
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 ele...
分类:
其他好文 时间:
2014-06-17 23:05:13
阅读次数:
246
1、
??
Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m =
2 and n = 4,
return 1->4->3->2->5->NULL....
分类:
其他好文 时间:
2014-06-17 23:03:12
阅读次数:
257
题目
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()...
分类:
其他好文 时间:
2014-06-17 22:59:06
阅读次数:
223
Problem Description
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.
The warehouse has N rooms. The i-th room con...
分类:
其他好文 时间:
2014-06-17 22:47:38
阅读次数:
300
??
var d=new Date();
document.write("从 1991/02/02 至今已过去 " + d.getTime() + " 毫秒");
从 1991/02/02 至今已过去 1402917686044 毫秒...
分类:
其他好文 时间:
2014-06-17 22:46:57
阅读次数:
235
Robot Motion
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 10219
Accepted: 4977
Description
A robot has been programmed to follow the instructions in...
分类:
其他好文 时间:
2014-06-17 22:41:33
阅读次数:
294
测试oracle 11g cluster 中OLR的重要性
called an Oracle Local Registry (OLR): each node in a cluster has a local registry for node-specific resources
测试一:模拟olr异常丢失的情况:
这里首先将olr renam
[root@vm...
分类:
数据库 时间:
2014-06-17 22:14:36
阅读次数:
359
android.permission.ACCESS_CHECKIN_PROPERTIES 允许读写访问"properties"表在checkin数据库中,改值可以修改上传( Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded)
...
分类:
移动开发 时间:
2014-06-17 21:58:57
阅读次数:
437