Watch less,practice.

Lumicode turns lectures into focused questions, runnable challenges, topic maps, and shareable labs.

100+students
~1mto process
1000+hours logged

Trusted by students at

UNSWThe University of SydneyUniversity of Technology SydneyMonash UniversityUniversity of MelbourneAustralian National UniversityWestern Sydney UniversityUNSWThe University of SydneyUniversity of Technology SydneyMonash UniversityUniversity of MelbourneAustralian National UniversityWestern Sydney University
lumicode.dev

DEMO

Try a real challenge.

30 XP
1

Reachable Rooms

You start in room 0. Each room contains keys to other rooms. Use a stack or DFS to collect reachable rooms, then return True only if none are locked away.
Input:arg1 = [[1],[2],[3],[]]
Returns:true
Example 1
Input:arg1 = [[1,3],[3,0,1],[2],[0]]
Returns:false
Example 2
Input:arg1 = [[1,2],[2,3],[3],[]]
Returns:true
Example 3
Input
arg1 = [[1],[2],[3],[]]
Output
Expected
true

PRICING

Start free. Upgrade for more credits.

Get 1 Month Free Trial of Lumicode Pro

Sign up with your education email

No card required · Cancel anytime · No charge

Free

Start turning videos into practice.

$0/month

5 lifetime Lumi credits

Start free
All access to lab generation
Runnable coding challenges
Topic maps and community labs
Save and revisit generated labs

Pro

More credits for regular study.

$4.99USD /month

50 Lumi credits/month

Subscribe to Pro
Everything in Free
50 fresh credits after each successful payment
Built for weekly lab generation
More room for courses and revision

Schools & teams

For classes, cohorts, and departments.

Custom

Classroom plans and support

Contact us
Private class communities
Assigned labs for each class
Teacher and admin mode
Team accounts and onboarding

FAQ

Questions & Answers