⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 31s17 days 22 hours 19 minutes 31 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 31s17 days 22 hours 19 minutes 31 seconds.

Sign in to watch this lesson
Algorithms - Linear Data Structures · 4:17
A list whose last pointer leads back inside itself never reaches null. Floyd's tortoise and hare race on the rho 0 to 7 (tail 3, loop 5) and meet at node 5; the equation a = L - b then says that restarting one runner at the head and stepping both once lands them together on the entry, node 3, and one more lap gives the loop length. The same O(1)-memory trick works on any sequence x -> f(x): Find the Duplicate, and a pseudo-random generator measured on this Mac against a hash map of first visits.