Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 334 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 334 Bytes

The basic idea is to find the longest circle, in those index-pointer-chains. Start from unvisited each number, and then marked this position as visited, find the value whose index is the previous value. If the next value is visited, stop and then update the maxLen.

https://discuss.leetcode.com/topic/90538/c-java-clean-code-o-n