Thursday 6 August 2009

Visualizations of Sorting Algorithms in your browser

Here's a nifty web page which shows a way of visualizing the operation of various common sorting algorithms.

Sample output for Heapsort:



The coolest thing about this of course is the ability to dynamically generate rich graphics in the browser. All hail the HTML5 <canvas> element!

2 comments:

Regina Obe said...

This looks neat - could this mean no more messy flash or java applet when I need to do a graph

Dr JTS said...

Exactly! Everyone is excited about the canvas element for just that kind of thing.

There's some good Javascript libs already for working with canvas. I haven't seen a graphing one yet, but it's an obvious thing to do. Perhaps the JGraph guy will port his stuff to JS.

And I'm still thinking about what it would take to port JTS to JS... 8^)