## About Posts

Posts are more formal than WiKi, in which I will do some research and try to dive deeper. I will also present the references at the end of posts.

## All Posts

Most recent posts in chronological order:

class Lca { public: // 2^10 = 1024 // 2^14 > 10'005 static constexpr int kMaxN = 50'005; static constexpr ...

Read More
constexpr int kMaxN = 30'005; class RollingHash { public: using ll = long long; int hashes[kMaxN]; int bases[kMaxN]; int bases_reverse[kMaxN]; ...

Read More
Range Update constexpr int kMaxN = 100'001; using ll = long long; struct Info { int max; }; template <typename ...

Read More
The this post, we introduced how to get all prime numbers from 1 to n in o(nloglogn) time. Base on ...

Read More
Prime Numbers in [1, n] The naive method takes O(n^1.5)) time. // O(sqrt(a)) bool IsPrime(a) { if (a < 2) ...

Read More
The Sliding Window technique is usually used to find the shortest or longest qualified subarray. For example, find the shortest ...

Read More
Summary A spanning tree of some graph G is a subgraph that is a tree which includes all of the ...

Read More
Summary An Eulerian path is a path in a finite graph that visits every edge exactly once (allowing for revisiting ...

Read More
Summary No one is supposed to invent the Boyer–Moore voting algorithm during the interview. The point is how to write ...

Read More
Summary Pimpl is used to hide implementation details for library consumers. It hides headers, data members, as well as private ...

Read More