Hacker Rank : Algorithms : Arrays and Sorting : Correctness and the Loop Invariant