Spiral Matrix II solution recursion