Redis 介绍
redis 这个想必大家都了解,关于redis的安装参考这里,redis使用文档参见这里。
Redis C客户端的使用方法
Redis的c客户端 Hiredis使用比较广泛,下面主要介绍下它。
1,Hiredis的安装,配置
Hiredis客户端 在redis解压后的deps/hiredis下有相应的文件。如果你的安装包没有相应的文件可以到这里下载。
cd...
分类:
编程语言 时间:
2014-05-18 18:38:34
阅读次数:
418
【题目】
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
You may not alter the values in the nodes, only n...
分类:
其他好文 时间:
2014-05-18 10:22:34
阅读次数:
367
【题目】
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.
For example, given:
S:...
分类:
其他好文 时间:
2014-05-18 08:31:48
阅读次数:
228
题意:
Evaluate the value of an arithmetic expression in
Reverse Polish Notation.
Valid operators are +, -, *,
/. Each operand may be an integer or another expression.
So...
分类:
其他好文 时间:
2014-05-18 08:09:15
阅读次数:
190
有好多朋友评论以前的那篇博文说:代码中间没有注释。由于课程一直比较紧张,所以答应的注释直到今天才写,发表出来,给大家共享!#include
#include
#include
#include
#include
using namespace std;
//为+,-,*,/运算符 设定优先级
map priority;
void initMap()
{
//+,-运算符的优先级...
分类:
编程语言 时间:
2014-05-18 07:35:21
阅读次数:
290
??
主流算法:
1.搜索 //回溯
2.DP(动态规划)
3.贪心
4.图论 //Dijkstra、最小生成树、网络流
5.数论 //解模线性方程
6.计算几何 //凸壳、同等安置矩形的并的面积与周长
7.组合数学 //Polya
定理
8.模拟
9.数据结构 //并查集、堆
10.博弈论
...
分类:
其他好文 时间:
2014-05-18 07:25:00
阅读次数:
316
1132: 数据结构习题--使用栈实现进制转换
时间限制: 1 Sec 内存限制: 128 MB
提交: 15 解决: 9
[提交][状态][讨论版]
题目描述
使用栈将一个很长(>30)的十进制数转换为二进制数
输入
若干个很长的十进制数
每行一个
输出
转换为二进制,每行输出一个
样例输入
12345678901234567890123456...
分类:
其他好文 时间:
2014-05-18 07:18:49
阅读次数:
257
通常在redis机器数量多的时候,需要对redis的机器进行状态监控,可以采用Linux 的nc 来对多个shard进行状态查询和监测...
分类:
其他好文 时间:
2014-05-18 05:51:38
阅读次数:
247
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-spa...
分类:
其他好文 时间:
2014-05-18 04:12:07
阅读次数:
198
1、
??
Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below...
分类:
其他好文 时间:
2014-05-18 03:25:06
阅读次数:
301