this post was submitted on 14 Apr 2026
23 points (100.0% liked)

Programming

26563 readers
377 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

cross-posted from: https://lemmy.world/post/45602294

Hello All

I am someone who graduated some time back and was not able to score their first job in the field. I am recently getting back into programming a bit more as a hobby. In particular I am toying around with Rust and a bit of C#.

Was wondering what books you all used for data and algo class? It would be good if you know some with those languages in mind, but otherwise just a book that is more generic would be great too.

top 13 comments
sorted by: hot top controversial new old
[–] alex_riv@lemmy.org 1 points 7 hours ago

for self-study without the academic context, i'd lean toward "A Common-Sense Guide to Data Structures and Algorithms" by Jay Wengrow over CLRS. it's a lot more approachable and uses multiple languages including Python.

CLRS is the canonical reference but it's dense enough that it can stall beginners. the Wengrow book gets you actually implementing things quickly.

if you're specifically targeting Rust, the rust book has decent coverage of ownership-related patterns that affect which data structures make sense to use there vs other languages.

[–] eah@programming.dev 8 points 4 days ago (2 children)

https://openlibrary.org/books/OL7294306M/Introduction_to_Algorithms_Second_Edition

I don't have any experience reading similar books to say if this is a good one, but it was the book we were assigned for class. Algorithms are written in pseudocode. I sometimes use it as a reference.

[–] FrostyPolicy@suppo.fi 1 points 3 days ago

This a very good book on algorithms. Another good one is "The art of computer programming" by Donald Knuth. He also created Tex.

[–] InternetCitizen2@lemmy.world 1 points 4 days ago

Thank you for the link

[–] Dumhuvud@programming.dev 8 points 4 days ago* (last edited 4 days ago) (2 children)

Introduction to Algorithms / CLRS is what you're looking for. It's language-agnostic.

[–] SorteKanin@feddit.dk 1 points 3 days ago

Keep in mind this book is really long - I believe it's something to do with authors being paid by the page in the US? But anyways, it's very detailed but that may not be a bad thing. I don't have any other suggestions.

[–] InternetCitizen2@lemmy.world 1 points 4 days ago* (last edited 4 days ago)

Thank you for that pointer, helped me find it here

[–] SailorFuzz@lemmy.world 9 points 5 days ago (3 children)

Depends on what you're doing, programming wise. Structures and Algos is good if you're doing a lot of foundational, ground-up work. But most times (like 90%) you'll just use a library for those structures. If you really, really need a RedBlackTree (you dont), you're probably not going to build it yourself. I mean you can, but it's probably better (and safer) to import a library for it. It's more important to know their use-cases rather than how to build them.

I would argue, that if you're want to learn something functional, I would study up on Design Patterns. Especially for C#.

Structures/Algos are the tools, Patterns are what to build with the tools.

Best book, long term, is probably: Design Patterns: Elements of Reusable Object-Oriented Software I have it, use it. It's great as a reference, but it's also very "textbook".

I actually recommend: Game Programming Patterns it covers almost all the same patterns as the above. But, it's written with a functional "game" usecase standpoint, which makes it easier to comprehend and get through.

[–] InternetCitizen2@lemmy.world 2 points 5 days ago

Depends on what you're doing, programming wise. Structures and Algos is good if you're doing a lot of foundational, ground-up work.

True. I guess to be a bit more clear its a bit more for its own sake to built the brain muscle of sorts.

Thank you for the links. I do love a yummy textbook.

[–] one_old_coder@piefed.social 1 points 4 days ago

I would go with Head First Design Patterns, it's more fun.

I would also give a try to Head First Software Architecture and the associated podcast.

[–] sobchak@programming.dev 1 points 4 days ago

You need to have a general idea what structures and algorithms those libraries are using, so you know if they're a right fit for your use case,what configuration options to use, and how they'll scale. Design patterns are good to learn (required even), but I wouldn't go too deep into them. IIRC, that Design Patterns book goes a little too crazy and gets a little too abstract in some cases, and is what caused all that Enterprise Java craziness. The profession seems to be currently moving away from that kind of OOP, and moving to OOP-ish + some functional programming concepts mixed in (Rust, React, etc).

[–] Glitchvid@lemmy.world 5 points 4 days ago (1 children)

The course I'm in uses Algorithms (Fourth Edition) by Sedgwick and Wayne^[Theres a book, supplemental video courses, and example implementations: https://algs4.cs.princeton.edu/home ], and I consider it pretty good. A large focus is on clear implementations that demonstrate the core parts of each algorithm, without getting bogged down in specialization, which I can appreciate. The book also has very good visualizations (they call them traces) if you learn better visually. The only real downside is it's entirely Java oriented material. But since you're working with C# this probably isn't a deal breaker.

The other recommendation in the thread is Introduction to Algorithms, which I've read chapters of (used as reference) — personally it's ok, definitely more abstract and math heavy, so if that's something you want or appreciate then it's a good option.

There's also The Art of Computer Programming by Knuth, which to me is grad level stuff, very very math heavy, but also brilliant, if you can keep up.

[–] InternetCitizen2@lemmy.world 1 points 4 days ago

That course link looks very helpful thanks