This one is a bit trickier than the standard interview question because of the additional requirement that you cannot allocate additional space. You must modify the array in-place with O(1) extra memory.
Still, not overly difficult though.
Runtime: 1ms, faster than 95.22% of Java online submissions
Memory Usage: 45.7 MB, less than 76.40% of Java online submissions