Spread Avoidance Escape
TikTok interview questions · Hard · Coding round · 5 tests
Precompute when contamination reaches every cell, then binary-search how long you can safely wait before starting.
The full question, tests and reference solution are available with a plan that includes TikTok.
Run your code with Ctrl+Enter to see results.