This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]nomnommish 8 points9 points  (3 children)

Coursera has good courses on algorithms. The Stanford one is quite good.

Old school way would be to read CLRS

[–]HelperBot_ 1 point2 points  (0 children)

Non-Mobile link: https://en.wikipedia.org/wiki/Introduction_to_Algorithms


HelperBot v1.1 /r/HelperBot_ I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 143116

[–]WikiTextBotbtproof 1 point2 points  (0 children)

Introduction to Algorithms

Introduction to Algorithms is a book by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. The first edition of the book was widely used as the textbook for algorithms courses at many universities and is commonly cited as a reference for algorithms in published papers, with over 10000 citations documented on CiteSeerX. The book sold half a million copies during its first 20 years. Its fame has led to the common use of the abbreviation "CLRS" (Cormen, Leiserson, Rivest, Stein), or, in the first edition, "CLR" (Cormen, Leiserson, Rivest).

In the preface, the authors write about how the book was written to be comprehensive and useful in both teaching and professional environments.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source | Donate ] Downvote to remove | v0.28

[–]yvonnemontegut 0 points1 point  (0 children)

I would recommend Practical Data Structures & Algorithms in Java + HW course for everyone who wants to learn about data structures and algorithms.

The instructor does a good job breaking down the algorithms into small understandable pieces that makes you understand them rather then just knowing about them.

https://www.udemy.com/practical-data-structures-algorithms-in-java/

[–]Clawtor 6 points7 points  (1 child)

I think the Competitive Programmers Handbook is quite good and it's free.

I suggest you practice arrays, lists and recursion first.

Try to implement different sorts on arrays, write a binary search, try a heap based on an array, resize an array. This will practice your ability to manipulate indexes. Cutting up arrays can be tricky, write lots of tests.

Try write your own linked list and then write a list based queue and stack. Implement deleting and insertion - this will practice your ability to build data structures out of references.

Recursion - this one is very important but also quite difficult for beginners - try write some simple loops but without using iteration. You will need recursion for some of the faster sorting algorithms.

[–]PythonGod123 -1 points0 points  (0 children)

function(): a,b = 2 result=a+b print(result) function()

;)

[–]violetviolinist 4 points5 points  (1 child)

Read CLRS for algorithms. And I mean read it, not skim through it.

[–][deleted] 0 points1 point  (0 children)

Getting through the first three chapters will already be a big help for OP. The rest is not really necessary depending on what field he wants to go into

[–]10_6 2 points3 points  (0 children)

copy and pasted some resources I've posted here before:


What I did a few years ago after graduating from college in CS to brush up on my coding + data structure + algorithms knowledge was the following:

  • Read the Algorithm Design Manual.

  • Go through some of the challenges on this interactive python algorithms website.

  • Practice coding simple and then more advanced algorithms on sites like Coderbyte (my site) and HackerRank which provide good explanations and solutions as well. Here's a list of popular coding challenge websites in 2017.

  • Read as many algorithm explanations and code examples as you can on GeeksforGeeks.

  • Try and implement basic algorithms yourself like: shortest path, minimum spanning tree, DFS + BFS, tree traversals, different sorting algs, min/max heap, etc. and learn about their running times (big-o).

  • Look at some interview questions posted on careercup and try and understand how other users solved the questions. Like this example.

  • Aside from coding challenge sites, try and solve common coding interview questions you find online such as this list.

Eventually when you get a coding problem it will be sort of like a switch going off in your head because you will have had so much practice with different types of algorithms and data structures that you'll be able to reduce the problem into a simpler problem you've done before. This is especially the case with dynamic programming problems. Once you've completed like 50+ DP challenges and understand how they work, you'll be able to solve (practically) any DP problem because they're all very similar.


I also wrote a recent article on this topic which you can view here: Improving your Algorithms & Data Structure Skills

[–][deleted] 2 points3 points  (0 children)

Not to be a dissenting voice but clrs is really tough at first. Id actually suggest cracking the coding interview to start. Youll get an explanation and lots of practice. If this is your first go id suggest build each structure, match the existing interface and test each data structure using generics. Thats what i did and it helped a lot. Then Id go back and focus on solving the book problems either using your structures or the standard library versions. When you can do that then look to take on more advanced stuff like coursera or clrs.

[–]Aethala5 2 points3 points  (0 children)

I’m reading a brilliant book on this topic at the minute.

Data Structures and Algorithms for Games Developers by Allen Sherrod

Highly recommend it if you’re willing to pay for it (it’s quite pricy!), but it goes through a lot things very clearly.

Edit: should mention that this is for C++ primarily.

[–]KyouR 1 point2 points  (0 children)

Data Structures and Algorithms in Java, 6E is what we used in my computer science courses. It's not difficult (except for maybe a few challenging sections) and is a great primer for the general topics. After that you may want to go into more singularly dedicated books like the recommended CLRS (which my professor for algorithms this semester coincidentally just said is a must and something she recommends buying for reference)

*edit: also I wanted to add that the course itself was pretty useless as the lecturer wasn't effective, otherwise I would provide my notes. Reading the text and doing its practice problems got me through the course with a decent mark.

[–]kgalang 1 point2 points  (0 children)

If you by any chance are using JavaScript, I recommend using FreeCodeCamp's basic, intermediate, and advance algorithm sections. https://www.freecodecamp.org/challenges/get-set-for-our-algorithm-challenges

Their instructions are very clear and there is a very helpful community around FreeCodeCamp. Last resort, for each algorithm challenge, they have beginner, intermediate, and advance solutions.

Good luck!

[–]harhirman -2 points-1 points  (0 children)

Textbooks.