Uber| Phone | Construct Graph with Slashes
Anonymous User
1234

Given a list of forward and back slashes in a m x m array:

Construct a graph.
List paths from point 1 (top-left) to point 16 (bottom-right).

Paths and nodes can only by used 1 time.
** Border of the square is also connected.

Example:
image

slashes = [['/', '', ''],
['', '/', ''],
['', '', '/']
]

This array represents the graph below (the border of the square also counts as connections):

1 - - - 2 - - 3 - - - 4
| ◎ ◎ ◎ |
| ◎ ◎ ◎ |
5 6 7 8
| ◎ ◎ ◎ |
| ◎ ◎ ◎ |
9 10 11 12
| ◎ ◎ ◎ |
| ◎ ◎ ◎ |
13 - - - 14 - - - 15 - - - 16

I did not fully understand the question. Does anyone understand?

Comments (4)