Skip to content

Instantly share code, notes, and snippets.

@rahul4coding
Created December 16, 2019 18:19
Show Gist options
  • Save rahul4coding/7d99333f3164e42ee2025e36c86c098a to your computer and use it in GitHub Desktop.
Save rahul4coding/7d99333f3164e42ee2025e36c86c098a to your computer and use it in GitHub Desktop.
Delete node in a Linked List from a specified position
function deleteNode(head, position) {
if(position==0){
return head.next
}
head.next = deleteNode(head.next,position-1)
return head;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment