AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Glyser: A Fast Path for Small Arrays
Glyser automatically sorts an array if it's already partway sorted. It will only sort the unsorted parts and then merge with the sorted part. Glyser does one linear scan through the array and it just checks, hey, is this element less than the last one? And as long as that's true, it will keep accumulating this into a larger and larger section.