These are the list of Algorithms I have implemented with sufficient documentation in comments. Most of the implementations are based on sources available online (references mentioned in the comments).
Almost all implementations are ready-to-use for competitive programming contests.
List of algorithms:
- Range Minimum Query :
- <O(NlogN), O(1)>
- <O(N), O(sqrt(N))>
- Least Common Ancestor :
- <O(N), O(sqrt(N))>
- <O(NlogN), O(logN)>
- Fenwick Tree :
- 1-D : logN - update, read
- 2-D : logN.logM - update, read