https://medium.com/datadriveninvestor/array-rotation-o-1-space-solution-with-proof-of-correctness-c5af5713fe7c