Despite having two loops, the time complexity simplifies to O(n). However, the space complexity is constant since we're using the same array, so we have an improvement!

Step Fourteen