Redis介绍 Redis本质上一个Key/Value数据库,与Memcached类似的NoSQL型数据库,但是他的数据可以持久化的保存在磁盘上,解决了服务重启后数据不丢失的问题,他的值可以是string(字符串)、list(列表)、sets(集合)或者是ordered sets(被排序的集合),所...
分类:
其他好文 时间:
2015-10-31 00:27:27
阅读次数:
197
Write a function to find the longest common prefix string amongst an array of strings. class Solution { public: string longestCommonPrefix(vector& str...
分类:
其他好文 时间:
2015-10-30 09:20:08
阅读次数:
165
问题链接:https://leetcode.com/problems/longest-palindromic-substring/ Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there ...
分类:
其他好文 时间:
2015-10-30 02:21:57
阅读次数:
199
问题链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeating characters. For example, the longe...
分类:
其他好文 时间:
2015-10-29 06:21:35
阅读次数:
182
A simple application to binary tree traversal.class Solution { typedef pair Rec; // last val - length unsigned ret; void go(TreeNode *p, Rec ...
分类:
其他好文 时间:
2015-10-28 12:09:31
阅读次数:
140
今天闲来无事又刷了几道。Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parent...
分类:
其他好文 时间:
2015-10-27 22:05:04
阅读次数:
173
https://leetcode.com/problems/find-median-from-data-stream/Median is the middle value in an ordered integer list. If the size of the list is even, the...
分类:
其他好文 时间:
2015-10-27 13:26:20
阅读次数:
177
最长公共子序列(LCS,Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合此条件序列中最长的,则 S 称为已知序列的最长公共子序列。而最长公共子串(要求连续)和最长公共子序列是不同的。设X(m)={x(1), x(2)...
分类:
其他好文 时间:
2015-10-26 00:37:29
阅读次数:
202
package cn.edu.xidian.sselab;/*** Given a binary tree, find its maximum depth.* The maximum depth is the number of nodes along the longest path from t...
分类:
其他好文 时间:
2015-10-24 23:32:01
阅读次数:
262
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
其他好文 时间:
2015-10-24 12:44:28
阅读次数:
187