First Day Where You Have Been in All the Rooms
There are n rooms numbered from 0 to n-1 and you start in room 0. Each room has a distinct number in 0 to n-1, and each room may have some keys to access the next room(s). Initially, you have all the keys. The i-th room has keys[i] to access other rooms.
You can only travel to the next room if you have the key to that room. Return the first day you have been in all the rooms.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)