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.

  • 42
    11 year old me was watching anime, getting fat amd playing videogames
  • 6
    @AleCx04 dream childhood
  • 11
    My favorite sorting algorithm is Radix LSD (least common denominator) base 10.

    It’s actually really fucking sick.
  • 9
    @OmerFlame Radix sort is also my favorite ☺️

    But why base 10? Ease of explaining the implementation?
  • 3
  • 5
    yeah, reinventing the wheels and later realizing that you did that is cool. it's like a small confirmation that "yeah, i'm on the right track" :)
  • 0
    My fav is Shellsort: in-place, no recursion, and faster than Quicksort for lists of a few dozens in length.
  • 3
    I used modulus 7 in the real world yesterday and I felt similarly like a badass.
  • 0
    @HiFiWiFiSciFi Sevoman to Twodalf: you have no power here!
  • 1
    At that age I was phishing for Gunbound accounts :(
  • 3
    1. You are not human. ;-)

    2. We know who is responsible for SkyNet.
  • 2
    @AleCx04 11 year old me didn’t even know what programming was to begin with
  • 2
    It’s good to start at an early age, if I knew you could use programming to develop games I would’ve gladly started out as a kid...then again I would’ve created something retarded like super penisio bros
  • 1
    @d-fanelli exactly, I had seen things in movies but the idea of writing software did not cross my mind. Now, i was in 2002 at the time, computers were different than what they got early, I didanage to play with a commodore 64 that my uncles had, but I still did not get it :P things were different and if Root was a teenager in the 80s it would make sense to believe that she had to program them. But I am assuming too much
  • 0
    @AleCx04 Ooh, you really assuming there. Way off πŸ˜…
  • 1
    @Root oooh so youse a 90s baby like me?
  • 1
    Holy shit, 11yo and already thinking about performance and sorting algorithms. When I was 11 all I could do was play around in visual basic, I don't think I even knew what arrays were.
  • 0
    For me the computer was the cheat code generating wizard of oz using the magic of the dial up Internet. I knew where to go when I needed mortal Kombat fatalities or cheat codes for crash bandicoot
  • 1
    @Root no, it’s just really fucking mesmerizing to see it visualized and it sounds fucking SICK when you attach sound to it. There is a project called “Sound Of Sorting”, and it does just that. And it has Radix 😎
  • 2
    FWIW having very limiting constraints is basically how most algos with nice complexity metrics get made.
Add Comment