• + 0 comments
    def deleteNode(llist, position):
        if position == 0:
            return llist.next
        
        cur = llist
        
        while position > 1:
            cur = cur.next
            position -= 1
        cur.next = cur.next.next
        return llist