Comment on Marge Sort

<- View Parent
SmoothLiquidation@lemmy.world ⁨3⁩ ⁨days⁩ ago

When you merge two sorted lists, you only have to compare the first element of each, since you can trust that all of the other elements are bigger. All the steps before that are there to make sure that is true.

source
Sort:hotnewtop