96Design a GPU credit system: issue, spend, and expire credits.▼hardOpenAIAnthropicNVIDIA1 replies◆ premiumA credit ledger that grants GPU-hours, spends them, and expires unused grants. The trap is which grant to spend first. Here is the FIFO-by-expiry design.Open full answer →
100Simulate infection spreading across a 2D grid with multi-source BFS, passing staged test cases.▼mediumGoogleAmazonMeta2 replies◆ premiumThe rotting-oranges family of build screens: a state spreads outward one step per tick across a grid, and the spec gains rules each round. The signal is multi-source BFS by layers, not per-cell loops. Here is the design that absorbs each new test case.Open full answer →