Library / SDK
ShahjalalShohag/code-library avatar
ShahjalalShohag/code-library

code-library is one C++ template folder per competitive programming topic

Templates, algorithms and data structures implemented and collected for programming contests.

3,763 stars893 forksC++MIT

At a glance

What is it?
ShahjalalShohag/code-library collects competitive programming templates, algorithms and data structures into ten topic folders written mostly by one author over about four years. The repository ships no build, no package and no releases, and points readers at a separate topic list site that carries the problems and tutorials and tracks progress.
Who is it for?
This repository suits a contest participant who wants a reference implementation for a known algorithm and a linked problem to practise it on, and who is comfortable reading other people's C++. It does not suit production work, since nothing here is packaged, versioned or tested as a library.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 8 months ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • ShahjalalShohag/code-library3,763 ★ · +50
Star history
Repository2026-09-242026-11-15
ShahjalalShohag/code-library3.7k3.8k

50 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Ten topic folders replace any notion of a library API

The top level of the repository is a set of directories named after competitive programming topics, not a package with an entry point. There are ten of them: Basics, Data Structures, Dynamic Programming Optimizations, Game Theory, Geometry, Graph Theory, Math, Miscellaneous, Number Theory and Strings. Sitting beside them are two files, Guidelines.md and LICENSE.txt, and the README itself. Nothing in that list compiles as a library: there is no manifest, no build script, no test target and no header to include. The Dynamic Programming Optimizations folder is the most specific of the ten, since it separates optimisation techniques from the dynamic programming problems that use them, which tells you the classification is by technique rather than by platform or difficulty.

The repository insists you check the topic list first

The first section of the README is a heading that reads as an instruction, Topic List, followed by the note that for this library it must be checked. The list itself is not in the repository. It lives on a separate site at youkn0wwho.academy/topic-list, and what it contains is described in two clauses: the relevant problems and tutorials for each topic, and the ability to track your progress there. That division of labour is the design of the project. The repository holds implementations, the site holds the curriculum and the record of what you have covered, so someone learning a topic can move from a folder of templates to the problems that exercise them without the repository having to maintain a syllabus.

Most templates are the author's own, and the exceptions were rewritten

The provenance of the code is stated rather than implied. The README calls it a personal code library holding almost all the important templates needed in competitive programming, and it parenthesises the word almost as being there for courtesy. The attribution line that follows is more interesting: most of the code was originally written by the author, and some was collected from others but modified in a cleaner way. So there is no third party licence to track per file, because anything taken from elsewhere was reworked rather than pasted, and the licence file at the root covers the collection as a whole under MIT. The claim about cleanliness is the author's judgement about his own style, which is a different kind of statement from a measured comparison.

The list took about four years to assemble

A time estimate appears in the middle of the README and it is the only number about the work itself. It says it took around four years to complete the list, followed by a personal account of what that meant: each line might be a line to the reader, but to the author it recorded the excitement of learning those structures and the sleepless nights spent looking for the knowledge. That framing explains the shape of the repository. A four year accumulation produces breadth rather than curation, which is why ten broad topic folders sit side by side with no indication of which template is preferred for a given problem, and why a companion site with progress tracking exists to impose an order on material that the repository itself does not sequence.

The stated reason for publishing is that private knowledge expires

A heading asks why the library is being shared, and two answers follow. The first is practical: to make someone else's learning path a little smoother. The second is stated bluntly, that knowledge hidden inside the author's head, or code sitting in a private library, becomes useless when he is dead, so it is better to share it before then. A third line asks for a star, phrased as making the author happy in the sense of paying him, which is the usual GitHub request with the economic joke left in. Nothing here claims the templates are original research or that they outperform anything, and the badges at the top of the file are the standard counters for contributors, forks, stars and issues plus a licence badge and a LinkedIn link.

Problem links are attached so a template has something to practise on

One feature is described as attaching practice to the code. The README says that a few problem links are attached to most of the codes, so that a reader can practise those problems, and it pairs that with the author's assessment that his coding style is clean and readable. The qualifier matters: a few links, attached to most files, which means the practice material is uneven rather than systematic, and a template without a link has no exercise attached to it. Combined with the topic list site, which claims to hold the relevant problems and tutorials for each topic, the repository is best read as a place to find an implementation once you already know which technique you need, rather than as a curriculum.

No releases, no homepage, and the licence badge points at master

The version signals are almost absent, and what remains is slightly inconsistent. There are no GitHub releases, so there is no tag to depend on and no changelog to read, and the repository declares no homepage, so the topic list site and the author's profile are the only external destinations. The licence is MIT and lives in a file named LICENSE.txt, which is an unusual extension for that licence and differs from the LICENSE spelling most tools look for. The licence badge in the README points at a path on the master branch while the default branch is main, so the badge link is following a branch name the repository no longer uses as its default. The last push to main is dated 2026-03-03, and the repository is not archived.

Editorial conclusion

This repository suits a contest participant who wants a reference implementation for a known algorithm and a linked problem to practise it on, and who is comfortable reading other people's C++. It does not suit production work, since nothing here is packaged, versioned or tested as a library. Before relying on a template, read the guidelines file for the author's conventions, check the last push date of 2026-03-03 to judge how current the collection is, and treat the topic list site rather than the repository as the thing that tracks your progress.

Frequently asked questions

What is inside the ShahjalalShohag code-library repository?

Competitive programming templates, algorithms and data structures, sorted into ten topic folders: Basics, Data Structures, Dynamic Programming Optimizations, Game Theory, Geometry, Graph Theory, Math, Miscellaneous, Number Theory and Strings. Beside them are Guidelines.md, LICENSE.txt and the README.

Is every template in code-library written by the author?

Most of them are. The README states that most code was originally written by the author and that some was collected from others but modified in a cleaner way. It also hedges about coverage, calling the set almost all the important templates, with almost there for courtesy.

How do I track which topics I have covered with code-library?

Progress is tracked on the companion topic list site rather than in the repository. The README points there first, saying that for this library the topic list must be checked, and the site is described as holding the relevant problems and tutorials for each topic along with progress tracking.

Is code-library usable as a dependency in a project?

There is nothing to depend on: no GitHub releases, no tags, no package manifest and no build configuration. It is a folder of C++ implementations to read and copy, licensed under MIT in a file named LICENSE.txt, with the last push to the main branch dated 2026-03-03.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. ShahjalalShohag/code-library on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/shahjalalshohag-code-library.svg)](https://hysenlabs.com/projects/shahjalalshohag-code-library)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/shahjalalshohag-code-library.svg)](https://hysenlabs.com/projects/shahjalalshohag-code-library)

Was this useful?