You are viewing a single comment's thread. Return to all comments →
Nice Solution. Here is the same idea in python:
def GetNode(head, position): tracked = head while position > 0: head = head.next position -= 1 while head.next: head = head.next tracked = tracked.next return tracked.data
Seems like cookies are disabled on this browser, please enable them to open this website
Get Node Value
You are viewing a single comment's thread. Return to all comments →
Nice Solution. Here is the same idea in python: