Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "root remembers her childhood"
When I was in 7th grade, my neighbor (a DoD programmer) challenged me to write a sorting algorithm for a hypothetical super limited environment (he said a satellite). It didn’t have any built-in sorting methods, had very limited memory, slow processor, etc. so I needed to be clever about it.
It took me a few nights before i found a solution he liked. The method I came up with counted the number of occurrences of each number in the array and put them in the appropriate spots in a new array. This way it only required O(2n) running time and 2n memory.
I just learned today that this is called the “counting sort” 😄
I’m proud of little 11 year old me.20