打印杨辉三角指定行,返回vector类型。【思路】1.照搬前面一道题,保存所有行;2.最小空间复杂度0(n),也是题目要求。即每一行覆盖上一行,为了保证不提前覆盖有效值,需要从后向前算。【other code】vector getRow(int rowIndex) { vector r...
分类:
其他好文 时间:
2015-04-24 16:04:37
阅读次数:
116
Option Explicit' VBA Script that gets info on the currently selected email using propertyAccessor and various syntaxes' (see other scripts at http://w...
分类:
编程语言 时间:
2015-04-24 15:56:14
阅读次数:
262
二叉树中是否存在一条路径(从根节点到叶节点)的和等于给定值。【思路】1.想到用栈深度遍历,不会实现。2.递归,每个节点自身的值,加上左子树或右子树等于给定值吗?【other code】bool PathSum(TreeNode *root,int sum,int val) { ...
分类:
其他好文 时间:
2015-04-24 10:30:39
阅读次数:
131
package other;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/*
* MD5 算法
*/
public class MD5 {
// 全局数组
private final static String[] strDig...
分类:
编程语言 时间:
2015-04-23 00:42:53
阅读次数:
163
求二叉树深度。【思路】很简单,二叉树经典。用递归求左树右树的深度,较大值加1即可。【other code】int maxDepth(TreeNode *root) { if(root==NULL) return 0; //if(maxDepth(ro...
分类:
其他好文 时间:
2015-04-22 23:53:08
阅读次数:
165
Eclipse可视化操作MySQL:1、打开DataSourceExplorer窗口。Eclipse>window>showview>other>Datamanagement选中DataSourceExplorer点击OK,即可在当前页面打开。2、配置数据库连接。在DataSourceExplorer窗口中点击DatabaseConnection右键,点击new打开新窗口。选择..
分类:
数据库 时间:
2015-04-22 18:44:08
阅读次数:
1650
If the host computer is not running SSH (or RSH), we can configure and run rsync as a daemon in this computer. This would have rsync listening to the port 873 for incoming connections from other comput...
分类:
系统相关 时间:
2015-04-22 14:02:55
阅读次数:
229
Pokemon MasterTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 15 Accepted Submission(s) : 8Pr...
分类:
其他好文 时间:
2015-04-21 22:19:24
阅读次数:
147
多项式求和Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 5 Accepted Submission(s) : 5Problem Descr...
分类:
其他好文 时间:
2015-04-21 20:02:49
阅读次数:
102
水仙花数Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 11 Accepted Submission(s) : 6Problem Descr...
分类:
其他好文 时间:
2015-04-21 18:01:39
阅读次数:
154