HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 10 days agoMarge sortimagemessage-square7fedilinkarrow-up18cross-posted to: programmerhumor@lemmy.ml
arrow-up18imageMarge sortHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 10 days agomessage-square7fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarecreamlike504@jlai.lulinkfedilinkEnglisharrow-up0·10 days agoI was with you until the last step. How did it all get sorted, instead of having two “peaks”?
minus-squarexorollo@leminal.spacelinkfedilinkarrow-up0·10 days agohttps://en.m.wikipedia.org/wiki/Merge_sort The video animation shows what is going on when you merge two lists together. You’re comparing the first two indices and sorting them to complete that step.
minus-squarecreamlike504@jlai.lulinkfedilinkEnglisharrow-up0·10 days agoThank you! I now understand the joke.
I was with you until the last step. How did it all get sorted, instead of having two “peaks”?
https://en.m.wikipedia.org/wiki/Merge_sort
The video animation shows what is going on when you merge two lists together. You’re comparing the first two indices and sorting them to complete that step.
Thank you! I now understand the joke.
https://youtu.be/7cDo1sWNgbI