What is Nostr?
Terence Eden /
npub1lh0…a5ll
2023-08-21 10:01:10

Terence Eden on Nostr: I had a dream that an old University prof was teaching me a sorting algorithm. Can ...

I had a dream that an old University prof was teaching me a sorting algorithm. Can someone tell me what the proper name for it is?

Take a random array of unique ints, e.g. `[5, 9 10, 1, 7, …]`

Initialise a massive, empty vector.
`vector<int> vect(10000, 0);`

Walk the array and insert values the vector where the key is the old array's value.
`vect.at($i) = $i;`

My dream professor was complaining the BBC Micro didn't have enough RAM for C++ (which is understandable).

Anyway, what's it called?
Author Public Key
npub1lh05slh2nk6h5m3jp7qwtjmrmegtah6nj626g8qdg3a7ds3kg0ss9aa5ll