Hacker News new | ask | show | jobs
by stcredzero 2920 days ago
Just ensure the bits are always zero on allocation, use DFS, and ensure you re-zero the bits on the way out.
1 comments

Since the first pass quit when it finds the first marked node, the zeroing can traverse the structure, erasing marked bits, and stopping at the first 0. The entire structure doesn't have to be visited.
The entire structure doesn't have to be visited.

We are both saying this.