# This cheat sheet is one long README, and the table of contents is half the value

> The algorithms and data structures cheat sheet is a single README that covers big O notation, problem solving patterns, sorting, trees, heaps, hash tables, graphs and dynamic programming, with runnable examples. It also carries practice folders for Advent of Code, HackerRank interview preparation and Python, and it has no licence file.

**tajpouria/algorithms-and-data-structures-cheat-sheet** — Providing a summary of important algorithms and data structures along with their key characteristics and use cases. It can be used as a quick reference for solving programming problems or refreshing knowledge of foundational computer science concepts.

- Repository: https://github.com/tajpouria/algorithms-and-data-structures-cheat-sheet
- Stars: 845 · Forks: 148
- Language: Python
- License: not declared
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/tajpouria-algorithms-and-data-structures-cheat-sheet

## The whole thing is a README, and that is the design

There is no package to install here and no library to call. The repository contains a README, an assets directory with a chart, and four folders of practice work, and the README is the product.

That is a legitimate choice, and for its purpose a good one. The table of contents at the top is machine generated, with anchors inserted before each heading so that the links land precisely, and it lists around fifty entries: big O notation, the complexities for common object and array methods, space complexity, problem solving patterns, searching, six sorting algorithms, then the data structures, then graphs, then dynamic programming, and finally a catch-all section of notes on strings, arrays, objects, maps and maths.

The cover sentence states the intent plainly, providing a summary of important algorithms and data structures along with their key characteristics and use cases, usable as a quick reference for solving programming problems or refreshing knowledge of foundational concepts.

What you get is a reference card, not a course. There is no narrative, no exercise set inside the document, and no explanation of why a particular implementation choice was made. For a developer who has met these structures before and wants a fast recall of the trade-off table, that is exactly right. For someone meeting a binary heap for the first time, it will be a list of facts without the reasoning that makes them stick.

## Big O is presented with the caveat it deserves

The first substantive section defines an algorithm as a set of steps for solving a specific problem and a data structure as a method for organizing and storing data so it can be accessed and modified efficiently, and then moves into big O notation as a way to describe the upper bound of an algorithm's running time.

The complexity ladder is given as a list with one line of explanation each: O(1) constant, O(log n) logarithmic, O(n) linear, O(n log n) log-linear with a smaller coefficient than O(log n), O(n^2) quadratic, O(n^3) cubic and O(2^n) exponential. A chart image comparing the common complexities from fastest to slowest sits alongside it.

The honesty is in the closing note, which says that big O only provides an upper bound and that actual running times may be faster in practice. The examples make the same point from the other side. The O(n) example is a loop that sums to n, and the O(1) example computes the same sum with the closed form, and the note on the two loop example says it is possible to think of the complexity as O(2n), but that big O expresses the general trend rather than a precise measure of the number of operations.

That is the correct framing, and it is the line most cheat sheets skip.

## The examples are TypeScript, in a repository filed as Python

The code samples in the README are TypeScript, and this is worth flagging because the repository's primary language is recorded as Python and the topics include javascript and typescript.

The first three examples are complete functions with the complexity analysis attached to each.

```ts
function addUpToSimple(n: number): void {
    let total = 0;
    for (let i = 0; i < n; i++) {
        total += i;
    }

    return total;
}
```

```ts
function addUpComplex(n: number): void {
    return (n * (n + 1)) / 2;
}
```

```ts
function printUpAndDown(n: number): void {
    console.log("Going up");
    for (let i = 0; i < n; i++) {
        console.log(i);
    }

    console.log("Going down");
    for (let j = n - 1; j > 0; j--) {
        console.log(j);
    }
}
```

There is a small typing oddity in the first two, since the return type is declared as void while a value is returned, which a TypeScript compiler would object to. It is a documentation artefact rather than a shipped package, so nothing checks it, but it is a reminder that the code here has never been compiled.

The Python in the repository lives elsewhere. The python3/ directory holds the Python notes, and the topics list javascript and typescript alongside the algorithmic ones, so the language mix is deliberate even if the file extension mapping is not precise.

## Patterns first, then structures, then the harder graphs

The middle of the document is organised the way an interview preparation guide would be, and the ordering carries an argument.

The problem solving patterns come before the data structures. A frequency counter for counting occurrences. Multiple pointers, with sliding window as the named case, divide and conquer, and recursion, the last one carrying a nested section on understanding the call stack. The point of putting patterns first is that most interview-style problems are pattern recognition rather than structure invention.

Searching follows, with linear search as the only entry, and then six sorting algorithms: bubble, selection, insertion, merge, quick and radix. Radix is the one to note, because it is the only non-comparison sort in the list, and comparison lower bounds do not apply to it.

The data structure section then runs through singly and doubly linked lists, stacks, queues, trees with a terminology subsection, a binary search tree, tree traversal with a comparison table, binary heaps with its own terminology and a subsection on parent and child relations, priority queues, hash tables with a subsection on collisions, and graphs.

The graph part is the most substantial, with subsections on terminology, adjacency matrix, adjacency list, an explicit adjacency list versus adjacency matrix comparison, and a graph traversal section covering depth first and breadth first traversal, followed by a section on Dijkstra's shortest path first algorithm.

The last substantive block is dynamic programming, introduced lightly, with a Fibonacci sequence example, then memoization and tabulation as the two approaches, which is the standard framing and exactly the right place to introduce the idea.

## Practice sets sit next to the reference card

The four directories in the repository turn the sheet from a document into a small curriculum.

advent-2021/ and advent-2022/ are the Advent of Code solutions, two years of them. The hacker-rank-interview-preparation-kit/ folder is the interview preparation set. python3/ holds the Python version of the notes, and assets/ holds the images the README references, including the big O comparison chart.

Putting it together, the intended workflow seems to be: read the reference card for the concept, then apply it to the problem sets. The HackerRank kit in particular lines up with the patterns section, since a large share of those problems are pattern recognition exercises.

The repository is not archived and the last push was on 2026-06-24. It publishes no releases, so there is no tagged version to pin, and the only version marker is the last commit date in the badge at the top of the README.

There is a licence gap worth naming. There is no LICENSE file among the top level entries, and the repository's licence is recorded as unknown. That is unusual for a document people are invited to read and reuse, and it means the text and the practice solutions cannot be confidently copied into your own notes or your company's onboarding material.

## Where a cheat sheet stops and a textbook starts

The limitation is structural rather than a matter of missing detail.

A cheat sheet compresses. It gives you the complexity of a merge sort, the shape of a heap, the difference between memoization and tabulation, and moves on. That is a good deal when you are looking up a specific fact at 2am while a test runs. It is a poor deal when the goal is to understand why a binary search tree degrades, or why a priority queue is implemented as a heap rather than a sorted list, or when to reach for a hash table against a tree.

The document also mixes levels of detail unevenly. The big O section has worked examples with prose analysis, while the data structure sections are largely headings with terminology tables, and some topics, such as the string pattern matching, array, object, map and maths entries grouped under Interesting Stuff, are not developed at all in the pages shown.

The realistic alternative is not another cheat sheet but a proper reference, whether a textbook, a course, or the documentation of the standard library you are actually using. What this repository adds over those is speed and a single consistent notation, plus the practice sets that let you apply what you looked up.

The other alternative is to keep your own notes. A personal file with the same tables costs you an afternoon, is written in your own words, and is licensed however you like.

## Conclusion

This cheat sheet suits a developer who wants one dense page to check what a data structure or algorithm costs and what its trade-off is, since the structure is a table of contents you can navigate directly to a topic. It does not suit someone learning from scratch, since almost every section is a summary with no derivation, no worked exercises and no code in most topics, and it should not be used as a source you can republish, because the repository has no licence file at all. Before relying on it, check the last commit date on 2026-06-24 against the topic you care about, and treat the complexity claims as the usual Big O upper bounds rather than as measurements of any particular implementation.

## FAQ

### What does the algorithms and data structures cheat sheet cover?

The README covers big O notation, common problem solving patterns such as frequency counter, two pointers, sliding window, divide and conquer and recursion, searching, six sorting algorithms, linked lists, stacks, queues, trees, binary heaps, priority queues, hash tables, graphs with adjacency list and matrix, graph traversal, Dijkstra's algorithm and dynamic programming with memoization and tabulation.

### Which language are the code examples in the cheat sheet written in?

The examples in the README are TypeScript, with functions such as addUpToSimple and addUpComplex used to illustrate linear and constant time. The repository's primary language is recorded as Python, and a python3/ directory holds the Python material.

### Does the cheat sheet include practice problems?

Yes. The repository carries an advent-2021/ folder, an advent-2022/ folder, a hacker-rank-interview-preparation-kit/ folder and a python3/ directory alongside the README and the assets folder holding the big O comparison chart.

### What license is the cheat sheet released under?

The repository records no licence, and there is no LICENSE file among the top level entries. Anyone wanting to reuse the text or the solutions should confirm the terms with the author first.

### When was the cheat sheet last updated?

The last push to the repository was on 2026-06-24. The repository publishes no releases, so the commit date and the badge in the README header are the only version markers.

## Sources

- [Issues](https://github.com/tajpouria/algorithms-and-data-structures-cheat-sheet/issues)
- [README](https://github.com/tajpouria/algorithms-and-data-structures-cheat-sheet/blob/master/README.md)
- [tajpouria/algorithms-and-data-structures-cheat-sheet on GitHub](https://github.com/tajpouria/algorithms-and-data-structures-cheat-sheet)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tajpouria-algorithms-and-data-structures-cheat-sheet
