You are viewing a single comment's thread. Return to all comments →
def getNode(llist, positionFromTail): head = llist stack = [] while head: stack.append(head.data) head = head.next for i in range(positionFromTail+1): final = stack.pop() return final
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 →
This is Python Code using stack.