$ man dsa

A library of ways to think

Most problems are new; almost none are novel. Four years of contests taught me that behind thousands of problem statements sit a few dozen reusable moves. Sliding windows, disjoint sets, DP over subsets, binary lifting. And learning a move deeply beats skimming a hundred problems shallowly. This archive is that education, organized: 412 solutions across 19 topics, each kept because the problem was interesting enough to change how I approach the next one. It is also, indirectly, why a 21-hour production job became a 2-second one. Breadth-first search and bitsets were contest moves before they were production moves.
412 files
19 topics

clone it: git clone https://github.com/Arin016/Data-Structures-and-Algorithms.git

❯
412 of 412 files
▸STL76
10registration.cpp11commonabsolutediff.cpp12multimap.cpp13priorityqueue.cpp14candybag.cpp15reducethearray.cpp16set.cpp17studentandgrades.cpp18setoperations.cpp19towers.cpp1vector.cpp20concatenatearray.cpp21multiset.cpp22deque.cpp23indexedset.cpp24stlsearching.cpp25supportqueries.cpp26validparanthesis.cpp27countthepairs.cpp28sortbyrollnumber.cpp29intersetingame.cpp2productofdigits.cpp30meanvarimedianmode.cpp31Supportqueries2.cpp32NearestsmallerValues.cpp33largestrectangle.cpp34rainwater.cpp35SuperminimumSum.cpp36heightofsoilders.cpp37collissions.cpp38diversifythearray.cpp39rebuildoriginalarray.cpp3Buymaximumobjects.cpp40roundandround.cpp41maximumarea.cpp42gameondeque.cpp43molecularformula.cpp44AliceandBooks.cpp45setqueries.cpp46AddMul.cpp47ProductofLastK.cpp48SnapshotArray.cpp49sumpair.cpp4nextpermutation.cpp50FMBqueue.cpp51CircularQueue.cpp52Circulardeque.cpp53AllOneStringAlgoDesign.cpp54WordDictionaryTRIE.cpp55SearchSuggestionsSystemTRIE.cpp5stack.cpp6queue.cpp7queueusing2stack.cpp8map.cpp9goodsequence.cppalgodesigMEANMODEVARIANCEMEDIAN.cppalgorithmicdesign.cppcheckbalancedparanthesis.cppLFUcache.cppLRUcache.cppmaxofeverywindow.cppmedianusingtopkinsertremoveIdea.cppminstack.cppminstackADV.cppmonotonedeque.cppMultiset2TopKelementssummaintainence.cppnumberofsubarrayswithsumequaltox.cppparanthesisSTACK.cppphonepetest.cppRangeMaintainence1.cppRangeMaintainence2.cppsaminussbMaximiseyourscoreminimisetheopponentsscore.cppstackwithincrement.cppstlapplicationsmaximisenoofitems.cppTopKelementssummaintainence.cppwindowmaintainance.cpp
▸Dynamic Programming II57
▸Graphs55
▸Dynamic Programming42
▸Trees27
▸Segment Tree19
▸Binary search17
▸Recursion and Backtracking15
▸two pointers14
▸prefix and partial sums13
▸bit manipulation12
▸Disjoint Set Union12
▸number theory12
▸Tries12
▸String algorithms11
▸sweep line9
▸meet in the middle6
▸Divide and conquer2
▸Modular Arithmetic1
01

why a library, not a streak

Solved problems are kept as references — each one earns its place by changing how the next problem gets read, not by filling a calendar.

02

from contest to production

The 21-hour SoD job became a 2-second one with moves this archive teaches: breadth-first search over org hierarchies, bitsets for permission comparison.

03

how to use it

Pick a topic, solve until the pattern becomes reflex, then move on. Every file below links to the actual code in the repo.