nim-game-constant-complexity

Status: IN

`canWinNim` is O(1) time and O(1) space — a single modulo operation — which is necessary because n can be up to 2^31 - 1, making DP infeasible.

Source: entries/2026/06/06/nim-game-solution.md

JSON