【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
本文出处:http://blog.csdn.net/chaijunkun/article/details/27361453,转载请注明。由于本人不定期会整理相关博文,会对相应内容作出完善。因此强烈建议在原始出处查看此文。
最近在做一套系统,其中要求若干个Worker服务器将心跳信息都上报给中央服务器。当一定时间中央服务器没有得到心跳信息时则认为该Worker失效了,发出告警。...
分类:
其他好文 时间:
2014-06-05 07:03:13
阅读次数:
559
ledisdb是一个用go实现的基于leveldb的高性能nosql数据库,它提供多种数据结构的支持,网络交互协议参考redis,你可以很方便的将其作为redis的替代品,用来存储大于内存容量的数据(当然你的硬盘得足够大!)。同时ledisdb也提供了丰富的api,你可以在你的go项目中方便嵌入,作为你app的主要数据存储方案。与redis的区别ledisdb提供了类似redis的几种数据结构,包...
分类:
数据库 时间:
2014-06-03 05:29:45
阅读次数:
309
【题目】
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
【题意】
给定一个已排序的链表,删除其中的重复元素
【思路】
维护两个指针prev和cur, cur指针负责扫描链表,prev指向cur的前一...
分类:
其他好文 时间:
2014-06-03 04:05:39
阅读次数:
231
【题目】
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
【题意】
在“Search in Rotated Sorted Array”的基...
分类:
其他好文 时间:
2014-06-03 01:55:38
阅读次数:
173
【题目】
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1->1->2->3, return 2->3.
【题意】
给定一个有序链表,删出其中重复出现的值...
分类:
其他好文 时间:
2014-05-31 21:14:11
阅读次数:
333
引子:
在大数据时代,总希望存在一个Key-value存储机制,像HashMap一样在内存中处理大量(千万数量级)的key-value对,以便提高数据查找、修改速度。
所以,我们会想到,Memcached和Redis这两个NoSQL数据库(严格来讲二者都不可以算作数据库)。 1、Memcach...
分类:
其他好文 时间:
2014-05-31 15:35:29
阅读次数:
293
date:20140530auth:jinhttp://github.com/andymccurdy/redis-pyhttps://github.com/andymccurdy/redis-py/blob/master/README.rst一.安装#
yum -y install python-r...
分类:
编程语言 时间:
2014-05-31 08:26:10
阅读次数:
289
一、什么 RedisREmoteDIctionaryServer,简称
Redis,是一个类似于Memcached的Key-Value存储系统。相比Memcached,它支持更丰富的数据结构,包括string(字符串)、list(链表)、set(集合)、zset(sorted
set --有序集合)...
分类:
Web程序 时间:
2014-05-31 01:37:58
阅读次数:
390
DescriptionAn ascending sorted sequence of
distinct values is one in which some form of a less-than operator is used to
order the elements from smalle...
分类:
其他好文 时间:
2014-05-30 14:31:10
阅读次数:
297