3 ms·
I must have learned this algorithm in school, but completely forgot it. My naive implementation was 2), but this is the first explanation on this page that made
by pessimizer 12y ago
I must have learned this algorithm in school, but completely forgot it. My naive implementation was 2), but this is the first explanation on this page that made Floyd’s cycle-finding algorithm click for me:) Now I can't unknow it - thanks for the clarity and concision!