A fast, searchable reference sheet for common algorithm and data structure patterns — built for programmers who want quick, copy-paste-ready code during problem solving.
47 algorithm topics (Arrays, Dynamic Programming, Graphs, Trees, Sorting, and more), each with ready-to-use code snippets in 4 languages: Python, JavaScript, Java, and PHP. Every snippet includes a title, complexity badge (e.g. O(log n)), and a one-line explanation.
- Open https://azhar25git.github.io/algosheet/ in any browser — no server or build step needed.
- Pick a language from the top bar (Python, JavaScript, Java, PHP).
- Browse topics in the left sidebar (Array, Binary Search, Dynamic Programming, etc.).
- Search using the top search bar to find snippets by topic name, title, or keyword in the code.
- Copy any snippet with the Copy button that appears on hover.
Stuck on a sliding window problem?
- Type
slidingin the search bar → see Fixed Window and Variable Window snippets in your chosen language. - Copy the template, adapt it to your problem, done.
Need a graph shortest path?
- Click Graph Theory in the sidebar → grab Dijkstra or Bellman-Ford.
| Category | Examples |
|---|---|
| Data Structures | Array, Linked List, Stack, Queue, Heap, Trie, Segment Tree |
| Search | Binary Search, BFS, DFS, Quickselect |
| Sorting | Merge Sort, Bucket Sort, Sorting patterns |
| Graph Algorithms | Dijkstra, Bellman-Ford, Topological Sort, Union-Find |
| Dynamic Programming | 1D/2D DP, Knapsack, Coin Change, LCS, Memoization |
| Techniques | Sliding Window, Two Pointers, Prefix Sum, Backtracking, Bit Manipulation |
| Advanced | Segment Tree, Fenwick Tree (BIT), Monotonic Stack/Queue, Sweep Line |
Pure HTML + Alpine.js + Tailwind CDN. Just open the file.
Prepared by Azhar Uddin · GitHub