C++ Solution to Leetcode 48. Rotate Image