Language:
Default
Power Network
Time Limit: 2000MS
Memory Limit: 32768K
Total Submissions: 23407
Accepted: 12267
Description
A power network consists of nodes (po...
分类:
Web程序 时间:
2014-10-24 22:21:49
阅读次数:
265
题目描述:
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
解题思路:直接DFS。
代码:
/**...
分类:
其他好文 时间:
2014-10-24 13:04:21
阅读次数:
147
问题描述:
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
解...
分类:
其他好文 时间:
2014-10-24 13:03:03
阅读次数:
148
Clone Graph:Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are ...
分类:
编程语言 时间:
2014-10-24 09:07:12
阅读次数:
227
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-10-23 22:15:45
阅读次数:
130
分块 Or 线段树 分块的登峰造极之题每块维护8个值:包括左端点在内的最长1段;包括右端点在内的最长1段;该块内的最长1段;该块内1的个数;包括左端点在内的最长0段;//这四个是因为可能有翻转操作,需要swap 0有关的标记 和 1有关的标记包括右端点在内的最长0段;该块内的最长0段;该块内0的个数...
分类:
其他好文 时间:
2014-10-23 16:11:18
阅读次数:
242
Handsome Swap(0443)Time limit(ms): 1000Memory limit(kb): 65535Submission: 89Accepted: 20AcceptedDescription所谓HandSome Swap是指对一串给定的数字,每次交换相临的元素(如 3 2 4...
分类:
其他好文 时间:
2014-10-23 01:25:45
阅读次数:
232
SharedPreferences是一种轻型的数据存储方式,基于XML文件存储key-value pairs键值对数据,通常用来存储一些简单的配置信息。SharedPreferences对象本身只能获取数据而不支持存储和修改,存储修改是通过Editor对象实现。每一个 SharedPreferenc...
分类:
移动开发 时间:
2014-10-23 01:22:34
阅读次数:
191
#include "iostream"using namespace std;void swap(char a[],int i,int j){ char temp; temp=a[i]; a[i]=a[j]; a[j]=temp;}void permutation(char ...
分类:
其他好文 时间:
2014-10-22 20:07:25
阅读次数:
143
昨天去南京某客户那里调优新上线的业务数据库,在查看alert.log日志时发现在过去的一段时间里,每过几个小时或间隔一段时间,就会报类似以下的内容:
Thu Aug 21 09:01:26 2014
WARNING: Heavy swapping observed on system in last 5 mins.
pct of memory swapped in [8.42...
分类:
数据库 时间:
2014-10-22 18:20:18
阅读次数:
494