2

What are some effective ways to understand the concepts of an algorithm? For example, there are many visual explanations for "Towers of Hanoi", and for some "easy-to-understand" algorithms. But for more complicated algorithms, I can't find animations that facilitate my understanding.

This question might seem subjective. Nevertheless, I am sure that many people just like me wonder if there are better ways to understand an algorithm more visually, because for some people, visually expressed things become more understandable.

4
  • You should read the FAQ. The site frowns upon question that are likely to solicit debate. All sorting algorithms have great animations available btw :p (Cause it's kind of straight forward to animate)
    – keyser
    Oct 14, 2012 at 8:50
  • Please reopen the question; the OP only gave sorting algorithms as an example. I was typing my answer, when I saw the question closing. "One good way to understand how an algorithm like QuickSort works is to step through it in an IDE, and use the Watches feature to see how key variables change. In this case, it would be the array and the indexes." Oct 14, 2012 at 8:52
  • Since learning is a very subjective process it's hard to come up with a general solution. A somewhat visual way is to do the algorithm on paper on a very small input, for example mergesort on [4,3,2,1]. Then you can choose your own level of detail for the visualization.
    – Zeta
    Oct 14, 2012 at 8:52
  • 2
    You understand algorithms better if you know what the motivation and intuitions behind them are. For example merge sort is like getting a stack of paper and divide them as long as you can sort the small things efficiently and then merge them back up to a stack of paper. Visualizations and animations help, but you have to get the intuition. Oct 14, 2012 at 8:52

0

Browse other questions tagged or ask your own question.