Count routes around blocked cells
A robot starts on the top-left cell of grid (a list of equal-length strings) and must reach the bottom-right cell, moving one cell right or one cell down at a time. . is a free cell and # is a blocked one, where the robot can never stand. Return the number of different routes.
The grid has 1 to 15 rows and columns. If the start or the finish is blocked, there are no routes.
Besides the tests, one large input (a 12 × 13 open grid) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
count_routes(["...",".#.","..."])→2count_routes(["..#.","....",".#..","...."])→7count_routes([".#","#."])→0