Lily's Homework

  • + 1 comment

    The key appears to be that the map is created prior to the sorting, so it indeed is different for the two passes and results in the swaps being done in a different order.

    Specifically i in the first for loop is different for the two passes.