Problem: Reachable Cells

public static int reachableCount(char[][] maze) {
  // your implementation goes here
}

For example:

S . #
. . #
# . .

All open cells are reachable, so the method returns 6. Notice I counted the start cell as well.

In this maze:

S # .
. # .
. # .

Only the three open cells in the left column are reachable from the start, so the method returns 3.