The problem, in one line. A list holds n distinct numbers taken from 0 up to n, so exactly one value in that range is absent, and you return it. LeetCode 268.
The tell. A complete range with one hole. When “everything should be here once, and one thing is not” meets a request for constant space, cancel what is present against what should be present.