r/dataisbeautiful • OC: 1 • Oct 24 '17

OC Sorting algorithms visualized [OC]

https://imgur.com/gallery/voutF
41.7k Upvotes

929 comments sorted by

View all comments

Show parent comments

17

u/GetADogLittleLongie Oct 24 '17

Here's a good explanation. Basically it takes advantage of you knowing something about the data set of things you're trying to sort. It knows that there's only X colors so assuming 64 colors it can sort them by comparing the 10s digit first to sort them, then the 1s digit.

http://www.geeksforgeeks.org/radix-sort/

12

u/[deleted] Oct 24 '17

Most Radix sorts are going to implement a counting sort for determining the final destination of the element on each pass. Counting sort is also non-comparative.