Algorithms hub · Now with synced code
Every Algorithm
Watch the algorithm. Read the code. Each line lights up exactly when it runs. Pick your language, hit play, and let the steps explain themselves.
- 01Loopsfor, while, do-whileO(n)
- 02Conditionsif/else, booleansO(1)
- 03Linear SearchScan every elementO(n)
- 04Binary SearchHalve each stepO(log n)
- 05Bubble SortAdjacent swapsO(n²)
- 06Insertion SortSort like cardsO(n²)
- 07Selection SortFind min, swapO(n²)
- 08Merge SortDivide and mergeO(n log n)
- 09Quick SortPivot partitionO(n log n)
- 10BFSExpand in ringsO(V+E)
- 11DFSDive then backtrackO(V+E)