jdk8 新增了原子操作类 LongAdder,它对标 AtomicLong,提高了多 CPU 并发下的效率,在这里记录一下。
Binary Search, Lower Bound, Upper Bound
Posted on
“Although the basic idea of binary search is comparatively straightforward, the details can be surprisingly tricky.” – Donald Knuth
Algorithm Random
Posted on
记录 Random 的算法实现
Algorithm Reservoir Sampling(蓄水池抽样)
Posted on
Reservoir Sampling(蓄水池抽样)可以简单的从大量流式数据中随机抽取指定数量的样本,并且保证样本被取到的概率相同,适合大数据分析场景。
Algorithm Sort
Posted on
记录 Sort 的算法实现
Algorithm Segment Tree
Posted on
记录 Segment Tree 的算法实现
Algorithm Minimax
Posted on
记录 Minimax 的算法实现
Algorithm Line Sweep
Posted on
记录 Line Sweep 的算法实现
Algorithm Heap
Posted on
记录 Heap 的算法实现
Algorithm Graph
Posted on
记录 Graph 的算法实现