Browser based visualization of sorting algorithms using Elm.
All of the visualized algorithms are implemented recursivly.
-
Bubble Sort
-
Insertion Sort
-
Merge Sort
-
Quick Sort
I’ve created a GitHub page that you can visit and play around with.
Elmgorithm was developed using the interactive development tool elm-reactor
.
You can download and start the app by executing the following commands.
$ git clone https://github.com/Kluddizz/elmgorithm
$ cd elmgorithm
$ elm reactor
This will start a local server on port 8000 by default. Now, the app is
accessible visiting http://localhost:8000/src/Main.elm
.
-
Choose an algorithm. In settings click the dropdown menu labeled with Algorithm and select an algorithm.
-
Get information about the running algorithm. You can read more about the implementation and performance of the running algorithm by clicking the question mark in at the top of the application.
-
Insert a number of elements. In the settings select the input field labeled with Elements and enter the number of elements inside the list to be sorted. Be careful with the input value. Some algorithms may be very slow and the application could freeze.
-
Generate random elements. In settings you can generate a new list using the New Values button. The number of elements are specified by the Elements input field.
-
Calculate and play the animation. In settings you can start the calculation of the selected algorithm and play the animation using the play button inside the animation control panel at the bottom of the application.
-
Watch the statistics and change the animation speed. While the animation is running you can observe some statistical information on top of the app.