HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 2 months agoMarge sortlemmy.mlimagemessage-square7fedilinkarrow-up116arrow-down10cross-posted to: programmerhumor@lemmy.ml
arrow-up116arrow-down1imageMarge sortlemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 2 months agomessage-square7fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarecreamlike504@jlai.lulinkfedilinkEnglisharrow-up1·2 months agoI was with you until the last step. How did it all get sorted, instead of having two “peaks”?
minus-squarexorollo@leminal.spacelinkfedilinkarrow-up0·2 months 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·2 months 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