We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Delete a Node
Delete a Node
Sort by
recency
|
820 Discussions
|
Please Login in order to post a comment
js solution function deleteNode(llist, position) { // Write your code here
let currentNode = llist;
currentNode.next=currentNode.next.next
return llist
}
Here is my c++ solution, you can have the video explanation here : https://youtu.be/EjWw69vLVYo
my c prgramming code
SinglyLinkedListNode* deleteNode(SinglyLinkedListNode* llist, int position) { SinglyLinkedListNode* temp1=llist; SinglyLinkedListNode* prev; if(llist==NULL){ return llist; } for(int i=0;inext; }prev->next=temp1->next; return llist; }
hello Guys,I faced issue as compilation error is there anyone who faced that issue and how can i solve it