Computer Science Canada Removing an element from a Linked List |
Author: | randint [ Wed Dec 05, 2012 11:23 pm ] | ||
Post subject: | Removing an element from a Linked List | ||
How do you remove an element from a custom (non built-in) LinkedList?
What do I need to do in order to remove a node (as specified by the user)? |
Author: | Panphobia [ Wed Dec 05, 2012 11:27 pm ] |
Post subject: | RE:Removing an element from a Linked List |
http://www.cs.bu.edu/teaching/cs112/spring-2000/linked-list-delete/ |
Author: | Tony [ Thu Dec 06, 2012 12:33 am ] |
Post subject: | Re: Removing an element from a Linked List |
randint @ Wed Dec 05, 2012 11:23 pm wrote: What do I need to do in order to remove a node (as specified by the user)?
I find that drawing this out as a diagram on paper is very helpful in understanding what needs to happen. http://compsci.ca/blog/super-paper-programming/ |
Author: | joshm [ Thu Dec 06, 2012 8:29 am ] |
Post subject: | RE:Removing an element from a Linked List |
find the node before the node you want to remove, then set the next node to the node after the node you want to remove |