#841 - Keys and Rooms
There are n rooms labeled 0 to n - 1. All rooms are locked except room 0. Each room may contain keys to other rooms. Given rooms where rooms[i] is the set of keys in room i, return true if you can visit all rooms.
| Input | Output |
|---|---|
rooms = [[1],[2],[3],[]] | true |
rooms = [[1,3],[3,0,1],[2],[0]] | false |