Skip to content
bossfight
.dev
learn
problems
guides
bosses
roadmap
practice
Interview mode
Live coding rounds with a clock
Gauntlet
Tiny problems back to back: spot it, code it
Quiz
Quick checks on every topic
Which technique?
Name the pattern before you code
Estimation drills
Back-of-envelope numbers for system design
By company
Work through one company's set
Mock assessments
Timed company sets, no hints
Codebase rounds
Fix and extend a real repo
progress
sign in
Search
Ctrl K
menu
Learn
Learn (step by step)
Guides
Roadmap
Practice
Problems
Interview mode
Gauntlet
Quiz
Which technique?
Estimation drills
By company
Mock assessments
Codebase rounds
Play
Boss fights
You
Progress
Sign in
~/rounds
Courier maze
hard
60 min
Python
Meta AI-enabled coding-style
1
Through the wall
2
Build a feature
3
Make it fast
repo
courier/
__init__.py
courier.py
grid.py
keys.py
tests/
visible/
test_routes.py
maps.py
README.md
README.md
read-only
# courier Routes a delivery robot through a warehouse map. Maps are text, one row per line, all rows the same width: # wall . floor S the robot's start X the delivery point a-f keys A-F doors (door A needs key a) The robot moves one cell up, down, left or right per step. It can't leave the map or walk through walls, and it can only pass a door once it holds that door's key (keys are picked up by stepping on them and kept). courier/grid.py Grid: parses a map, finds S and X, neighbours of a cell courier/courier.py delivery_steps(text): fewest steps from S to X, or -1 courier/keys.py route_with_keys(grid): the search for maps with keys Run the tests with `python -m pytest` (or press Run in the browser).
esc