Day 19/60: Sorting in JavaScript
Today's note was about keeping the ordering invariant visible so sorting in javascript is more than a library call. I kept coming back to the same checks: keep the sorted and unsorted regions explicit throughout the implementation, use slices and temporary buffers deliberately, and check what work each pass actually removes from the problem.
The failure mode worth watching is naming the sort correctly but losing the ordering invariant inside the loop.…
