▲ | Interactive Visual Sorting(mszula.github.io) | |||||||||||||||||||||||||
168 points by jason1610 7 days ago | 32 comments | ||||||||||||||||||||||||||
▲ | mszula 3 days ago | parent | next [-] | |||||||||||||||||||||||||
Hey all, Author of the project here. Thank you for your warm words, and a bunch of feedback. I created the project mainly to learn about Svelte and play with algorithms, these running bars fascinate me. I was hoping that this tool would also help understand how sorting algorithms work. I still have a few features planned, such as advanced statistics. If you have any ideas on how to develop this or want to contribute with me, I would be happy to invite you I would also like to thank you for the stars on Github, it is really satisfying when someone enjoys the fruit of my work. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | johnchristopher 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Oooh, bogosort led me to https://en.wikipedia.org/wiki/Bogosort and divine sort: Divine sort A sorting algorithm that takes a list and decides that because there is such a low probability that the list randomly occurred in its current permutation (a probability of 1/n!, where n is the number of elements), there must have been a reason for the list's order. Therefore, it should be considered sorted in a way we don't understand, and we do not have any right to sort it to our beliefs, as if it were sorted "as God intended." Also known as Intelligent Design sort.[11] | ||||||||||||||||||||||||||
▲ | smusamashah 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
I also made a sorting visualizer based on a popular imgur sorting gifs gallery. Demo https://xosh.org/VisualizingSorts/sorting.html Post https://xosh.org/sorting-algorithms-visual-comparison/ Imgur gallery I was trying to replicate https://imgur.com/a/voutF This also let you try out your own sorting algorithm too btw and share that in url. For example this algo https://xosh.org/VisualizingSorts/sorting.html#IYZwngdgxgBAZ... which was discussed at the time https://news.ycombinator.com/item?id=31975507 (Dont turn on sound, i dont know how to make it sound nicer) The detail slider is a manual thing. You put the render call with 1/2/3 level in the loop. Only the lines with same render level will be displayed. Can be used to see the sorting at different granularity. | ||||||||||||||||||||||||||
▲ | Sn0wCoder 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Ok spent way too much time fiddling with the options and testing out different sort algorithms. It’s fun to start with one sort and then halfway through switch to one that is very different and see if it helps or hurts the performance. Almost makes me want to break out the old Algorithms and Data structures book to remind myself of which one to use when you know the data could already be half sorted vs when you know the data is going to be completely random. Bookmarked but guessing I will never use it again but who knows if I ever need to do another leet code test this would be a good resource for sorting. This could be useful for those of you that are still in college to have one of those aha moments when it comes to the sorting algorithms you are learning about. If you are going to look at the code, go to src -> lib -> sort-algorithms to see how they are implemented. Note the asterisk after the function* keyword which signifies a generator function. | ||||||||||||||||||||||||||
▲ | thih9 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Siren sound: sort the table using any algorithm and then run the bubble sort on the sorted set. Press "reverse" for a different flavor. Latch: switch to a different tab mid-sort. Switch back to stop the latch. Metronome: Hit "valley" and run selection sort. Free Jazz[1]: Hit "shuffle" and run bitonic sort. | ||||||||||||||||||||||||||
▲ | block_dagger 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Cool project. Suggestion: disable sound by default and consider more musically pleasant tones. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | Y_Y 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
I loved when it had a popup to beg me to star it on GitHub. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | ucirello a day ago | parent | prev | next [-] | |||||||||||||||||||||||||
In the box of QuickBasic 4.25 Professional it has a BAS file that was exactly like this. Really neat. It even played sounds! | ||||||||||||||||||||||||||
▲ | publicprivacy 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
This is really cool. I am learning DSA at age 34, and you inspired me to go harder in prepping for FAANG+ | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | jakegmaths 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
I made a similar thing earlier this year at https://www.mathsuniverse.com/sorting that doesn't have music and focuses more on teaching students how different sorting algorithms work and how they compare to each other. | ||||||||||||||||||||||||||
▲ | factormeta 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
The visual of Radix LSD (https://en.wikipedia.org/wiki/Significant_figures#Least_sign... ) was quite interesting! | ||||||||||||||||||||||||||
▲ | theodpHN 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
"Bublé Sort" (2016) https://communities.sas.com/t5/Graphics-Programming/Fun-With... | ||||||||||||||||||||||||||
▲ | xnx 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Videos from this tool (or one like it) are surprisingly popular on TikTok. | ||||||||||||||||||||||||||
▲ | xhls 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Jerma985 | ||||||||||||||||||||||||||
▲ | wduquette 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Gosh, and I thought this would be about solitaire games. | ||||||||||||||||||||||||||
▲ | LVB 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Nice. My son likes the YouTube videos of these sorting demos and I’m sure he’ll get into this too. | ||||||||||||||||||||||||||
▲ | joshdavham 4 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Nice project! Even cooler that it was built in svelte | ||||||||||||||||||||||||||
▲ | chris_wot 4 days ago | parent | prev [-] | |||||||||||||||||||||||||
So, the only sort worth a damn in Quick Sort? | ||||||||||||||||||||||||||
|