Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cultivate algorithm intuition?

Tags:

When faced with a problem in software I usually see a solution right away. Of course, what I see is usually somewhat off, and I always need to sit down and design (admittedly, I usually don't design enough), but I get a certain intuition right away.

My problem is I don't get that same intuition when it comes to advanced algorithms. I feel much more up to the task of building another Facebook then building another Google search, or a Music Genom project. It's probably because I've been building software for quite some time, but I have little experience with composing algorithms.

I would like the community's advice on what to read and what projects to undertake to be better at composing algorithms.

(This question has nothing to do with Algorithmic composition. Well, almost nothing)

like image 477
Asaf R Avatar asked Feb 21 '09 22:02

Asaf R


People also ask

What is intuition in algorithm?

But, a new book, The Intuitive Algorithm, (IA), suggested that intuition was a pattern recognition process. Intuition propelled information through many neural regions like a lightning streak. Data moved from input to output in a reported 20 milliseconds. The mind saw, recognized, interpreted and acted.


2 Answers

+1 To whoever said experience is the best teacher.

There are several online portals which have a lot of programming problems, that you can submit your own solutions to, and get an automated pass/fail indication.

  1. http://www.spoj.pl/
  2. http://uva.onlinejudge.org/
  3. http://www.topcoder.com/tc
  4. http://code.google.com/codejam/contests.html
  5. http://projecteuler.net/
  6. https://codeforces.com
  7. https://leetcode.com

The USACO training site is the training program that all USA computing olympiad participants go through. It goes step by step, introducing more and more complex algorithms as you go.

like image 95
Himadri Choudhury Avatar answered Sep 18 '22 15:09

Himadri Choudhury


You might find it helpful to perform algorithms physically. For example, when you're studying sorting algorithms, practice doing each one with a deck of cards. That will activate different parts of your brain than reading or programming alone will.

like image 45
John D. Cook Avatar answered Sep 20 '22 15:09

John D. Cook