Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
思路:最简单的方法就是按...
分类:
其他好文 时间:
2014-06-18 12:40:54
阅读次数:
265
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
JDBC 存储过程 调用 CallableStatement...
分类:
数据库 时间:
2014-06-18 12:20:07
阅读次数:
285
题目
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
In...
分类:
其他好文 时间:
2014-06-18 12:03:16
阅读次数:
227
DDL Setup Steps
SQL> grant execute on utl_file to ggs;
Grant succeeded.
Create GLOBALS file
[oracle@zwc ~]$ cd /ggs/
[oracle@zwc ggs]$ cat GLOBALS
GGSCHEMA GGS
run marker_s...
分类:
数据库 时间:
2014-06-17 23:24:30
阅读次数:
534
命令模式(command pattern) 详解本文地址: http://blog.csdn.net/caroline_wendy命令模式: 将请求封装成对象, 以便使用不同的请求\队列\日志来参数化其他对象. 命令模式也支持可撤销操作.命令模式:调用者(Invoker);命令(Command): 可执行方法(execute), 具体命令(Concrete Command);接受者(Receive...
分类:
其他好文 时间:
2014-06-17 22:53:01
阅读次数:
359
CGlib是一个强大的代码生成包,常被用于各种AOP框架,提供“拦截”功能。JDK本身就为控制要访问的对象提供了一种途径,动态代理Proxy。但是被代理的累必须实现一个或多个接口。如果想摆脱这个限制,为没有实现借口的类代理的话,可以使用CGlib。
下面是一个入门学习的小例子。
需求:InfoManager类有四个方法,query、del、create、update。要对这些方法进行访问控制。...
分类:
其他好文 时间:
2014-06-17 19:31:21
阅读次数:
175
在JAVA中JDK版本与JDBC版本的一致性十分重要,开发都们常常会忽略了这一点导致很多不必要的错误。昨天给客户排查了一个关于PostgreSQL在JBoss中使用时关于这方面的问题,希望给大家一点启发。...
分类:
数据库 时间:
2014-06-17 16:36:37
阅读次数:
337
2005-08-24 来源:CSDN 作者:wanchao2001 前言 在使用数据库的过程中,不可避免的须要使用到分页的功能,但是JDBC的规范对此却没有非常好的解...
分类:
Web程序 时间:
2014-06-17 14:54:23
阅读次数:
252