You are viewing a single comment's thread. Return to all comments →
simplest python solution:
def deleteNode(llist, position): curr = llist prev = llist if position == 0: return llist.next for i in range(position): prev = curr curr = curr.next prev.next = curr.next return llist
Seems like cookies are disabled on this browser, please enable them to open this website
Delete a Node
You are viewing a single comment's thread. Return to all comments →
simplest python solution: