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?
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?