Verified interview challenge
Rectangle Board
Build a rectangle board whose changes can be undone, even when several overlapping rectangles are removed together.
Unlock with Full AccessThe challenge
Start by adding rectangles, then remove them by ID or position. Add undo history before handling batch removal as a single reversible action. The five parts share one Python class. Choose guided practice or a 60-minute practice timer.
What you'll practise
Spatial selection
Choose the right rectangles when their positions and boundaries overlap.
Reversible operations
Restore earlier state without losing identities or creation order.
Batch changes
Treat several removals as one action while preserving earlier methods.
# Build on your implementation
# Run checks for the current part
# Full starter code includedRun your code to see results.