Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I watched it again and read the algorithm description part, and I think you're right - D should have been switched to false, as the hand was pointing to it when a cache miss happened.


I watched it again and checked it against the python reference code.

The code and documentation are correct, the animation is wrong.


The behavior is inconsistent with what happens to A and B at the very beginning.

Whenever the hand skips a visited node in search of an unvisited one, it must flip it to unvisited.

If D were given this special treatment every time the hand cycles around, it will forever stay in the cache even if not accessed (D-plomatic immunity?)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: