How to get started with algorithms and where to practice learned?

resources
algorithms

#1

Hello everybody! :wave:

I’m new here and I have some questions. I would love to hear your recommendations and opinions.

It’s known that you need to learn algorithms, as you’ll mostly like have algorithm related questions on job interviews, or you’ll need them to finish some tasks.

I’ve ran away from this for some time, but now I see I need to learn this well.

I’m wondering what resources do you recommend? What are the most important algorithms you need to know?

Also, some guidelines on how to study those stuff can be helpful. :slight_smile:

And, once you learn theory, where/how you can put in practice?


#2

John Calhoun has a good intro series written in Go. That might be a good place to start. Also free code camp has three whole sections of curriculum on algorithms, these are in JavaScript.



#3

The Go one seems like a great idea and introduction to algorithms, but sadly it’s not maintained anymore/finished.

I’ll see FCC, looks like they have a lot of content. Do you have any idea do you need front-end skills or it’s pure JS?


#4

I think he got busy with gophercises, which would be fun too.

FCC is pure JavaScript, the algorithms are. The frontend challenges use jquery and maybe other frameworks.


#5

Learn how to implement a linked list and a binary tree and you will be well covered on the data structures front. Hash tables for extra credit.

Learn a few sorting algorithms, and how to do it for more than just arrays of integers. If you can correctly implement a quicksort for a collection of data objects, you’ll have most of what will come up in an interview.

As for practicing what you learned, you can write example programs. If you write automated tests for the programs (especially in a test first style) you will deepen your understanding.


#6

I personally haven’t read all of these articles (I might still be running away from algorithms :laughing:), but I’ve heard they’re very accessible and fun to read: BaseCS

This one in particular looks like a good place to start: Sorting Out The Basics Behind Sorting Algorithms.


#7

Thank you so much for all the links! I really appreciate them. The BaseCS looks like a great blog, I’m definitely going to give it a try.

Now, I guess it’s time to sit down and study. :smiley:


#8

I’d suggest LeetCode. They have a lot of problems you can solve on the site that are similar to what you might see in a real interview, and pretty good solution writeups.


#9

The classic textbook on algorithms is Introduction to Algorithms. This is used in many university courses and contains a ridiculous amount of information. It can be a little bit dry and, well, textbooky at times, so it’s good as a reference or for learning algorithms which are interesting for you rather than as a cover-to-cover read.


#10

For fun, you might want to check out https://idea-instructions.com

I heard about this at https://www.programmingthrowdown.com/2018/04/episode-76-code-documentation.html


#11

I’d recommend Grokking Algorithms. It’s a really fun, enjoyable and straightforward read that explains a bunch of common algorithms very well with super helpful analogies and illustrations.

I went through this book after I finished a coding bootcamp and it helped me a lot. The examples are in Python but I had no problem coding along in JavaScript instead as the code examples are minimal and always well explained.

https://www.manning.com/books/grokking-algorithms

(I think you can also find it as a pdf online too…)


#12

This is really helpful! Thank you so much everyone for such great resources!

I have also found this two repositories (from https://www.reddit.com/r/golang/comments/8aipqu/data_structures_and_algorithms_updated/):
https://github.com/emirpasic/gods
https://github.com/floyernick/Data-Structures-and-Algorithms

Both are in Go, and I still haven’t checked them, but they look promising.


#13

To be honest after a lot of false starts I just decided to enroll in a community college course and it’s been a big help.


#14

I suggest taking a look at what coursera has to offer: https://www.coursera.org/courses?languages=en&query=algorithms&userQuery=algorithms


#15

If you want to supplement the hands-on exercises with some reading, Programming Pearls by Jon Bentley is a great book and quite accessible.