2 ms·
Just ensure the bits are always zero on allocation, use DFS, and ensure you re-zero the bits on the way out.
by stcredzero 8y ago
Just ensure the bits are always zero on allocation, use DFS, and ensure you re-zero the bits on the way out.
- WalterBright 8y agoSince 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.
- stcredzero 8y agoThe entire structure doesn't have to be visited. We are both saying this.