I'm thinking of brushing up on my algorithms knowledge and want to start from the basics. I haven't done a proper review in a long time. Which programming language do you all think is best for learning algorithms: a lower-level language like C or a higher-level one like Python? Also, can you recommend any course materials for studying?
4 Answers
Data structures and algorithms (DSA) are pretty much the same no matter which language you choose. I learned them in Java and found C++ enjoyable as well. Python is a great option too!
You should use the search function on this site. There are plenty of posts about DSA already. Just type 'DSA' in the search box and you'll find tons of discussions and materials.
True! People keep asking for help with DSA, but I’ve been through the same situation before when I switched fields. I started with Python because it's easy to read and helps you focus on the algorithm without worrying about low-level details. Once you get the hang of it, transitioning to C for a deeper understanding is a good idea. I found combining video lectures with hands-on coding practice worked best for me!
When it comes to learning algorithms, the language you use isn’t as important as you might think. Algorithms are universal and can be implemented in any language. Just pick the one you’re most comfortable with. If you dive into low-level languages without understanding the basics, you might just confuse yourself with pointers and memory management, which aren’t really necessary for grasping algorithm concepts.
Algos and data structures really transcend programming languages. However, I think C provides a unique clarity, especially when dealing with pointers and references. Learning in a lower-level language allows you to visualize how data is copied or referenced, which is super important. I don’t have any specific course suggestions, but I tend to rely on books for deep dives. There's a list in my previous comments if you're interested.

Exactly! My DSA class used Python, but the professor had us implement everything without built-in functions to really get the hang of it. It was tough, but it paid off!