436. Find Right Interval

Problem Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point of the interval i, w...

2019/05/09 14:42
293
1026. Maximum Difference Between Node and Ancestor

Problem Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an ancestor of B. (A node A i...

2019/05/07 23:16
250
1027. Longest Arithmetic Sequence

Problem Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i_2], ..., A[i_k] with 0 <...

2019/05/07 14:37
78
1031. Maximum Sum of Two Non-Overlapping Subarrays

Problem Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and M. (For clarificati...

2019/05/05 19:07
190
1034. Coloring A Border

Problem Given a 2-dimensional grid of integers, each value in the grid represents the color of the grid square at that location. Two squares belong to the same connected compone...

2019/05/01 16:16
138
1035. Uncrossed Lines

Problem We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw a straight line connecting two numbers A[i] and B[j] as...

2019/05/01 15:58
152
Linux命令学习——split

split命令用来分割文件。 常用的参数有： -a，指定分割生成的新文件的文件名后缀长度。 -b，以byte为单位指定分割后单个文件的大小。 -l，以行为单位指定分割后单个文件大小。 可以在被分割的...

2019/04/29 11:24
84
Linux命令学习——wc

wc命令的作用是统计文件中的行数、词数、字符数。 常用的参数有： -l --lines，输出行数。 -w --words，输出词数。 -m --chars，输出字符数。 -c --bytes，输出字节数。 如果同时使用上述几个...

2019/04/21 17:33
64

2019/04/06 21:00
3K
fsync和fdatasync

2019/04/05 23:47
194
register关键字

register关键字从c++11开始已经弃用了，但是在看SuRF代码(https://www.cnblogs.com/YuNanlong/p/10235793.html) 的时候，还是看到了这个关键字的使用，所以粗浅的学习了一下这个关键字，在此...

2019/04/05 23:46
93
fopen函数出现段错误

2019/04/05 23:45
2.3K
Linux命令学习——strings

2019/04/05 23:45
204

2019/04/05 23:44
4.8K
CentOS7重置root密码

2019/04/05 23:40
99
Dostoevsky: Better Space-Time Trade-Offs for LSM-Tree Based Key-Value Stores ... 阅读笔记

Introduction 主流的基于LSM树的KV存储都在两方面进行权衡，一方面是写入更新的开销，另一方面是查询和存储空间的开销。但它们都不是最优的，问题在于这些存储系统在LSM树的每一个level上都采...

2019/04/05 23:38
455
SuRF: Practical Range Query Filtering with Fast Succinct Tries 阅读笔记

SuRF(Succinct Range Filter)是一种快速而紧凑的过滤器，同时支持点查询和范围查询(包括开区间查询、闭区间查询、范围计数)，可以在RocksDB中用SuRF来替换Bloom过滤器。 FAST SUCCINCT TRIE...

2019/04/05 23:37
797
LevelDB源码分析-Open

Open LevelDB的初始化主要由Open函数实现： Status DB::Open(const Options &options, const std::string &dbname, DB **dbptr) 首先，Open函数调用Recover函数将LevelDB的历史状态恢复： .....

2019/04/05 23:36
531
LevelDB源码分析-Version

Version VersionSet类 VersionSet管理整个LevelDB的当前状态： class VersionSet { public: // ... // Apply *edit to the current version to form a new descriptor that // is both saved...

2019/04/05 23:34
530
LevelDB源码分析-Bloom Filter

Bloom Filter bloom filter是leveldb中用来在一个block中检测key是否存在的工具，主要在BloomFilterPolicy类中实现： class BloomFilterPolicy : public FilterPolicy { private: size_t bi...

2019/04/05 23:34
366