sort list, recursive merge sort
shift right by k, mod k by len to make sure k is less than len