build-array-encode-order-safety

Status: IN

The `% n` in `nums[nums[i]] % n` during the encode pass ensures correctness regardless of whether `nums[nums[i]]` has already been encoded earlier in the same loop iteration.

Source: entries/2026/06/06/build-array-from-permutation-solution.md

JSON