this post was submitted on 26 Sep 2024
42 points (97.7% liked)

Programming

17316 readers
67 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 [email protected]



founded 1 year ago
MODERATORS
 

I am a fresh software engineering graduate and I am looking for something to improve my problem solving skills, while I did learn about basic algorithms and data structures, I feel like I could learn further more, I know about big O, fast sorting algorithms, dynamic programming, backtracking, binary trees (Although I do not think I know everything about them), I also know about low level memory concepts.

I am sure I forgot to mention some of the stuff I also know about, but I hope the ones I mentioned give a good insights on where I should move onto next.

top 15 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 1 month ago (2 children)

https://mitpress.mit.edu/9780262046305/introduction-to-algorithms/

This one is pretty hardcore. I bought the 2nd edition of it over 20 years ago when I started my career as a developer due to not doing a CS degree.

[–] [email protected] 3 points 1 month ago

Ha ha came here to suggest exactly this book!

It has it all, from bubble sort up to parallel algos and isn't it just a killer name, introduction to algorithms...

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago)

There are YT courses available to support the book. Or rather, the book exists to support the courses:

Don't mind the ages of these series - I watched them in full, and they're generally still relevant. I say generally because I'm not sure if I'll ever use a Tango Tree, but who knows!

PS: If you're not sure if you don't know the required Math, I created a graph of all MIT courses with YT videos here. The courses on the left are dependencies for those to the right.

[–] [email protected] 12 points 1 month ago (1 children)

If you want to improve your problem solving skills, I'd suggest solving actual problems. Data structures and algorithms can be very satisfying in their own right, but the real value is in taking a real-world problem and translating it into code.

It also depends what you want to do with your knowledge. There are domains that are deeply technical and require a lot of the things you've mentioned, but they also tend to be pretty hard to break into. A lot of software is not so deep. Any software project will have need for good domain modeling, architecture, and maintainability. Again, these are things best learned through practice.

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago)

I agree, and here's a few different avenues of examples:

  1. If trying to get past interviews, Leet code and hacker rank can be great. They're not so great for real world problems, but not bad.

  2. Advent of code is a good middle ground between theory and practice in my opinion.

  3. To really learn real world problem solving, I'd recommend implement a specification, without looking at existing implementations. For example, make a basic regex engine (formal Regular Expressions not PCRE expressions), or try to implement the C Preprocessor, or the JS event loop.

[–] [email protected] 7 points 1 month ago

https://numerical.recipes/

The current version is in C++

But if you check the link above, the older C and Fortran editions are free to read. This is the gold standard for numerical algorithms and scientific computing, without getting into things like GPUs and such.

[–] [email protected] 6 points 1 month ago* (last edited 1 month ago)

"Algorithms to live by" https://www.amazon.com/Algorithms-Live-Computer-Science-Decisions/dp/1627790365

Less technical than you probably want, but it is useful for mapping real world problems to known algorithms.

[–] [email protected] 6 points 1 month ago

If you're not in any hurry, The Art of Computer Programming by Knuth.

Although technically that's several books, not a book.

[–] [email protected] 4 points 1 month ago
[–] [email protected] 3 points 1 month ago

Ignore the name (neural networks might as well be a footnote). A more appropriate title would be "generic problems and algorithms".

(Artificial Intelligence: A modern approach by Russell and Norvig)

https://github.com/Youquan1/Artificial-intelligence-books/blob/master/Artificial%20Intelligence%20A%20Modern%20Approach%20-%20Stuart%20J.%20Russell%20%2C%20Peter%20Norvig.pdf

[–] [email protected] 3 points 1 month ago

There are plenty of good resources online. Here are some topics you probably wouldn't see in an intro algos course (which I've actually used in my career). And I highly recommend finding the motivation for each of these in application rather than just learning them abstractly.

  • bloom filter
  • btree
  • b+ tree
  • consensus algos (PAXOS, RAFT, VSR, etc)
  • error correction codes (Hamming, Reed Solomon, etc)
  • garbage collection (mark+sweep, generational, etc)
  • generational arena allocator
  • lease (i.e. distributed lock)
  • log-structured merge trees
  • min-cost + max-flow
  • request caching and coalescing
  • reservoir sampling
  • spatial partition (BVH, kd-tree, etc)
  • trie
  • write-ahead log
[–] [email protected] 2 points 1 month ago

Honestly I would take a look through a good standard library that provides a lot of algorithms (e.g. C++ or Rust). That has the basics, especially for data structures.

Also have a go at some hacker rank tests. Especially if you want to learn dynamic programming (abysmal name), they absolutely love that.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago) (1 children)

What have you built? What larger projects have you contributed to?

[–] [email protected] 3 points 1 month ago (1 children)

One of the biggest things I have built was a experimental 3D physics engine, it did require some memory allocation optimizations, I built a lot of stuff I cannot really list them all in here, An honorable mention would be an FPS game from scratch without a game engine.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

That's more than most SWE graduates have done, which is great! But it makes it difficult to judge what you might benefit from based on what you've shared.

To answer the title question, the suggestions provided by others here are all good resources for studying algorithms, but no one mentioned Algorithms Illuminated which is of a similar quality. Choose one of these suggested resources that vibes with your learning style.

But don't discount the suggestions to work on new projects that are outside of your current experience and requires more than your current knowledge base to complete. Trying things you haven't tried before really is the only way to do things you couldn't do previously.

Good luck!