You are viewing a single comment's thread. Return to all comments →
My approach in Java.. I am a C# guy. C# was not available so tried this.
Node Delete(Node head, int position) { Node temp=head; int pos=1; if(position==0) return head.next; while(pos<position) { head=head.next; pos++; } head.next=head.next.next; return temp; }
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 →
My approach in Java.. I am a C# guy. C# was not available so tried this.