You are viewing a single comment's thread. Return to all comments →
go golang solution
func deleteNode(llist *SinglyLinkedListNode, position int32) *SinglyLinkedListNode { if position == 0 { return llist.next } curr := llist for i := 0;i < int(position-1);i++ { curr = curr.next } curr.next = curr.next.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 →
go golang solution