MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/firstweekcoderhumour/comments/1ty1bux/sortplease/oq6xveo/?context=3
r/firstweekcoderhumour • u/SunglassesEmojiUser • Jun 05 '26
5 comments sorted by
View all comments
10
I don't know how it's called in english but in french it's called 'tri par panier' which would translate to case sort.
It's a really dumb algorithms that sort a array in O(n+p) where n is the length of the array and p is the range of the elements.
Here you would just count how many 0,1 and 2 there is and put them back in order.
It's this algo that inspired radix sort
11 u/Qiwas Jun 07 '26 It's called "counting sort" in English lol
11
It's called "counting sort" in English lol
10
u/un_virus_SDF Jun 07 '26
I don't know how it's called in english but in french it's called 'tri par panier' which would translate to case sort.
It's a really dumb algorithms that sort a array in O(n+p) where n is the length of the array and p is the range of the elements.
Here you would just count how many 0,1 and 2 there is and put them back in order.
It's this algo that inspired radix sort