Gitpedia

Algorithm Implementation

This is our effort to collect the best implementations to tough algorithms. All codes are written in c++.

From nisarg0·Updated May 29, 2026·View on GitHub·

We have not written all of these algos ourselves. This is merely a small collection of easy and beautiful solutions to complex problems. We have added reference links and questions on top of each file for further references. Feel free to star mark and fork :D The project is written primarily in C++, first published in 2021. Key topics include: arrays, binary-search, dp, lru-cache, segment-tree.

Algorithm Implementations

We have not written all of these algos ourselves. This is merely a small collection of easy and beautiful solutions to complex problems. We have added reference links and questions on top of each file for further references. Feel free to star mark and fork :D

Common time complexities

Let n be the main variable in the problem.

If n ≤ 12, the time complexity can be O(n!).
If n ≤ 25, the time complexity can be O(2n).
If n ≤ 100, the time complexity can be O(n4).
If n ≤ 500, the time complexity can be O(n3).
If n ≤ 104, the time complexity can be O(n2).
If n ≤ 106, the time complexity can be O(n log n).
If n ≤ 108, the time complexity can be O(n).
If n > 108, the time complexity can be O(log n) or O(1).

Features

  • Quick access to segregated codes.
  • Easy to understand yet small solutions.
  • Tries | Segment Trees (Trees), LRU Cache (OS).

Authors

Special Thanks to all the youtubers for the free and awesome content!!!

Support

If you find some error do rasie issue here.

For support, email nisarggogate212@gmail.com or dipleshmankape@gmail.com

Contributors

Showing top 3 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from nisarg0/Algorithm-Implementation via the GitHub API.Last fetched: 5/31/2026