Functional graph cycle entrance [mp]
Micro pattern¶
Description¶
Treat values as next pointers, detect a cycle, and reset one pointer to locate its entrance.
Problems¶
- 287. Find the Duplicate Number (Top Hard)
Treat values as next pointers, detect a cycle, and reset one pointer to locate its entrance.