You are viewing a single comment's thread. Return to all comments →
simpler solution
Node* Delete(Node *head, int position) {
struct Node *current=head; if(position==0) { head=head->next; return head; } while(position>1) { current=current->next; position--; } struct Node *de=current->next; current->next=(current->next)->next; free(de); return head;
}
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 →
simpler solution
Node* Delete(Node *head, int position) {
}