How can I learn algorithm from scratch
I had started with C programming on UNIX system about 3 years ago. Currently, I am comfortable with system & network programming. However, the biggest problem I face while coding is my lack of knowledge in the area of algorithm. A few weeks back someone suggested me a book named CLRS, however, even this introduction book is getting heavy now.
I am very poor at mathematics. There are tons of experienced folks out here, so I would be very grateful if you guys can let me know how I should start on my way to be good at algorithms.
Thanks.
7 comments
[ 4.0 ms ] story [ 31.1 ms ] threadI also suggest you to join this Coursera course, Algorithms: Design and Analysis by Tim Roughgarden[2]. Currently the course is open, so you can sign up for classes. The course is offered in two parts[3], complete both of them.
Once you are comfortable with basic concepts start solving questions/puzzles online on sites like SPOJ[4], UVa[5], (YC-funded) HackerRank[6]. You could try TopCoder[7] also, but the questions are bit difficult. Hope this helps.
PS - You should study math, because it is important in Algorithms Analysis. You could try reading required parts of Concrete Mathematics by Knuth[8] or as you come across new concepts, Google and understand them.
[0] - http://www.amazon.com/dp/8177583581
[1] - http://www.amazon.com/dp/1848000693
[2] - https://www.coursera.org/course/algo
[3] - https://www.coursera.org/course/algo2
[4] - http://www.spoj.com
[5] - http://uva.onlinejudge.org
[6] - http://hackerrank.com
[7] - http://www.topcoder.com
[8] - http://www.amazon.com/dp/0201558025
A book I think is informative from a practical perspective is Algorithms in a Nutshell from O'Reilly Press. As always with Amazon I would look for a used copy.
1. Coursera Algorithms I for formal university-style learning. See https://www.coursera.org/course/algs4partI
2. Algomation.com for visualising algorithms. See http://www.algomation.com/
3. http://bigocheatsheet.com/ for time/space complexities for the most common data structures & algorithms.
4. The book - Cracking the Coding Interview which goes through the questions that top companies like Google, Amazon, Microsoft ask during interviews. For their solutions, see https://github.com/gaylemcd/ctci
Hope that helps in some ways.
My only complaint is that they removed the videos from past sessions (I did find them elsewhere on the web).
The great thing about self-directed learning is that there is so much time over which to acquire new knowledge in the area. And in the age of the internet there are vast resources available on any computing topic.
The best resource for learning algorithms is Wikipedia. It doesn't stand alone and a lot of the typical algorithm article will go over most people's head but the more you learn the more of an article will make sense each time you come back to it.
Finally, there are only a few people who are objectively good at designing algorithms - Tarjan, Hoare, Dijkstra for example. Most of what is professionally good is pattern matching existing algorithms to new situations. That's the art that Knuth has spent sixty years describing.