> For the complete documentation index, see [llms.txt](https://guide.ivanzakutnii.com/the-hard-way-to-swe-excellence/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.ivanzakutnii.com/the-hard-way-to-swe-excellence/learning-path/algorithms-and-data-structures-1-2.md).

# Algorithms and Data Structures 1/2

<figure><img src="https://4124726163-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnHvYjCTUQx5RIHlaJ5ci%2Fuploads%2Fgit-blob-83da18d82b7d097e97bb2069cba94375fbef72b4%2Fimage.png?alt=media" alt="Anakin Skywalker saying, &#x27;This is where the fun begins.&#x27;"><figcaption></figcaption></figure>

Now you need to study algorithms and data structures, again with increasing complexity, specifically from Data Structures and Algorithms (DSA) courses.

Two main groups to focus on:

* Basic data structures – lists, stacks, queues, sets, hash tables, dictionaries
* Trees and graphs (we'll get back to these later)

There is a huge amount of paid and free material. Choose one structured source instead of jumping between disconnected explanations.

Choose the medium that helps you think, and keep passing each topic through thinking through writing. Good luck, and have fun cracking your brain!

Two durable free starting points are [Open Data Structures](https://opendatastructures.org/) and MIT OpenCourseWare's [Introduction to Algorithms](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-spring-2020/). The MIT course is more demanding; use its lectures and exercises when you are ready for mathematical analysis.

The following interview books can provide additional problems and explanations, but they are practice companions rather than complete data-structures textbooks.&#x20;

You do not need to buy both:

* "Cracking the Coding Interview" by Gayle Laakmann McDowell
* "Programming Interviews Exposed" by John Mongan, Noah Suojanen Kindler, and Eric Giguère

Use this learning loop for each topic:

1. Study the structure and the operations it supports.
2. Implement a small version yourself when that implementation teaches the mechanism.
3. Explain the time and space cost of the main operations.
4. Solve a representative set of tagged problems on Codewars, LeetCode, Exercism, or another platform.
5. Compare at least two solutions and explain when each one is appropriate.

Keep your solutions and notes in a repository so you can revisit them. Respect each platform's rules about publishing solutions. Thinking through writing is especially useful here because it exposes whether you understand the mechanism or only remember a template.

⚠️ When you understand the basic structures, continue with the learning path. We will return to trees, graphs, and more complex algorithms later. ⚠️

***

Answer to a possible question:

> Hey Ivan, what about LeetCode and NeetCode?

Oh, you are a nerd, aren't you? What are you doing here?

<div align="left"><figure><img src="https://4124726163-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnHvYjCTUQx5RIHlaJ5ci%2Fuploads%2Fgit-blob-092e77e5164b45153e30024641c6063b8e499508%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure></div>

LeetCode and NeetCode are good for practising algorithms and data structures. You can use them instead of Codewars. The platform matters less than following one structured source and studying each topic thoroughly.
