Regions Cut By Slashes
An a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, , or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as “\”.) Return the number of regions. Example 1: 1 2 3 4 5 6 7 Input: [ " /", "/ " ] Output: 2 Explanation: The 2x2 grid is as follows: ...