• + 0 comments

    Python

    def deleteNode(llist, position): if position == 0: llist = llist.next else:
    count = 1 temp = llist while temp != None and count < position: temp = temp.next count += 1

        # print(temp.data)
        temp.next = temp.next.next
        # print(temp.data)
    
    return llist