Date: Monday, March 8, 2010.
Name: ____________________________________________
- Suppose that you have a linked list describing ingredients for
a tasty soup, e.g., "beans", "potatoes", "beef", "salsa".
One of your friends is a vegetarian, so for him, you want to
delete "beef" from the list.
Draw, step-by-step, how you can delete the element
"beef" from the given linked list. Assume that we have a pointer p
that points to the previous element ("potatoes").
- Write a code that, given a linked list and a pointer pointing to
an element of this list, removes the following element from the list.
You can use the simplest possible implementation of the linked list.