We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here is my py3 solution with two pointers: 'slow' and 'fast' with distance being 'position'. We then move the two simultaneously until 'fast' reaches the tail node. Then 'slow' points to the node needed.
Get Node Value
You are viewing a single comment's thread. Return to all comments →
Here is my py3 solution with two pointers: 'slow' and 'fast' with distance being 'position'. We then move the two simultaneously until 'fast' reaches the tail node. Then 'slow' points to the node needed.