C++ Solution to Leetcode 1260. Shift 2D Grid