Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-11-30 21:18:12
阅读次数:
167
文一SQLite的FAQ里面已经专门说明,先贴出来。供以后像我目前的入门者学习。(7) 多个应用程序或者同一个应用程序的多个例程能同时存取同一个数据库文件吗?多进程可以同时打开同一个数据库,也可以同时 SELECT 。但只有一个进程可以立即改数据库。SQLite使用读/写锁定来控制数据库访问。(Wi...
分类:
数据库 时间:
2014-11-30 15:28:18
阅读次数:
358
DescriptionHarry: "But Hagrid. How am I going to pay for all of this? I haven't any money." Hagrid: "Well there's your money, Harry! Gringotts, the wi...
分类:
其他好文 时间:
2014-11-30 15:24:58
阅读次数:
169
任务是判断可能出现的情况:1.空格2.空指针3.首字符是04.首字符是“+”或“-”5.判断边界条件,上界INT_MAX=2147483647,下届INT_MIN=-2147483648,小心判断 1 // 2 // main.cpp 3 // Longest Substring 4 // ...
分类:
其他好文 时间:
2014-11-30 14:07:58
阅读次数:
163
最长上升子序列(Longest Increasing Subsquence)是指对一个序列,其中满足i
LIS普遍求法为动态规划。有两种算法。
第一种比较好写,复杂度O(n^2)。
设原序列为a[]。所有下标从1开始(即[1,n])。定义dp[i]为以a[i]结尾的最长上升子序列的长度。很容易得到转移方程:dp[i] = max{1, dp[j] + 1} 且 j
dp[i] = 1;...
分类:
编程语言 时间:
2014-11-30 12:37:30
阅读次数:
198
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BAN...
分类:
编程语言 时间:
2014-11-30 10:22:33
阅读次数:
241
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-11-30 07:04:09
阅读次数:
163
题目大意:你有N个开区间,每个区间有个重量wi,你要选择一些区间,使得满足:每个点被不超过K个区间覆盖的前提下,重量最大思路:感觉是很好想的费用流,把每个区间首尾相连,费用为该区间的重量的相反数(由于要最大,所以是求最大费用最大流),容量为1,至于不超过K的限制,只要从源点到第一个点的流量为K就行,...
分类:
其他好文 时间:
2014-11-29 17:20:06
阅读次数:
164
Write a function to find the longest common prefix string amongst an array of strings.Solution: 1 public class Solution { 2 public String longestC...
分类:
其他好文 时间:
2014-11-29 11:35:58
阅读次数:
165
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 le...
分类:
其他好文 时间:
2014-11-29 06:50:19
阅读次数:
189