Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The key to step 3 (of the merge sort) is the little nx in the middle that tells you to repeat step 3 n times. Each time, you take a right or left branch based on if the new weight from the half plank is lighter or heavier than the current weight. You also have to understand that step 1 means you recursively merge sort each half before you merge the two sorted halves.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: