59. Spiral Matrix II

From LeetCode. LeetCode Problem. Solve the geometry problem "59. Spiral Matrix II".

Examples
Input: [1,2,3]
Output: 0
Hints

59. Spiral Matrix II

**From LeetCode.** LeetCode Problem. Solve the geometry problem "59. Spiral Matrix II".