Python simulation problems
Follow the rules step by step until something happens: simulation problems in Python, with tests.
Beginner
Intermediate
- 84. Spiral Walk Through a MatrixWalk around the edges and work your way into the middle70 XP14 min
- 99. Game of Life: One StepCells are born, survive or die, all at the same instant80 XP15 min
- 281. Langton's AntOne tiny ant, two simple rules, and a surprise after ten thousand steps65 XP14 min
- 313. Bowling ScorecardStrikes, spares and the tricky tenth frame75 XP18 min
- 318. Parking Lot With a Waiting LineThe lot is full and the line is long: which cars have to drive away?75 XP16 min
Advanced
- 132. What Day of the Week?Name the weekday of any date in ten thousand years of calendar120 XP25 min
- 361. Snake GameEat, grow, and never bite your own tail125 XP28 min
- 379. War, the Card GameTwo decks, no choices to make: who ends up holding every card?135 XP30 min
- 393. Slide and MergeSlide the tiles, merge the twins, chase the big number140 XP30 min
Expert
- 190. The Office ElevatorOne elevator, a crowd of passengers: when does each one arrive?240 XP55 min
- 436. Sandpile AvalanchesPour on the sand and let the avalanches run until everything settles200 XP40 min
- 444. Falling BlocksDrop the pieces, clear the full rows: how tall is the pile at the end?220 XP50 min
- 451. Bank TellersSome customers jump the line, some give up: how long does each one wait?230 XP50 min
- 488. Life on an Endless BoardWhere will this colony of cells be a trillion generations from now?260 XP55 min
Other topics
- Python Basics
- Strings
- Lists
- Dictionaries and sets
- Loops
- Functions
- Math
- Sorting and searching
- Two pointers
- Sliding window
- Stacks and queues
- Recursion and backtracking
- Dynamic programming
- Greedy
- Graphs
- Trees
- Bit manipulation
- Classes
- Iterators and generators
- Parsing
- Python idioms
- Regular expressions
- Codes and ciphers
- Working with data
- Grids and matrices
- Geometry
- Games and puzzles
- Heaps
- Data structures
Or see every challenge, with study plans, today's challenge and duels.