Rectangle Board with Undo

Medium · Coding

Maintain a 2D grid supporting axis-aligned rectangle insertion, replacement, and deletion by ID with O(1) cell-coverage queries, full undo history, and atomic point-targeted batch removal.

This is a Pro problem. Pro unlocks the full prompt, a step-by-step walkthrough, a reference solution and tests you can run.

See Pro plans

More OpenAI problems