Comment by vlovich123

9 days ago

If the primary key is the number, it still works (and dates are just numbers by the way) because you can sort a heterogenous dataset by a single numeric key pretty trivially.

But sorting by arbitrary strings like names can’t avoid comparison sort.

That data structure isn’t an array of numbers, it’s an array of pointers to objects.