Loading page…
Three problems where sorting first turns a question about every pair into one pass. The move is to ask what a neighbour or a position tells you, and sort so that it does. The lecture covers the neighbour scan, the rank scan, the wrap on a clock and why counting pairs needs the merge.
Three problems sit on this street.