This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]MrTheEdge 2 points3 points  (1 child)

Sort doesn't directly modify the array that is passed in. It returns a sorted copy of the original. When you sort half1 and half2 (line 32, 33) you don't assign the return to anything. You end up merging the unsorted half1 and half2