Why the first method able to modify the arrays?
Clone arrays before sort so all tests can use the same data. Added additional step-points for better complixity tracking.