Date: Monday, October 11, 2010.
You can use the simplest possible implementation of the linked list.
- Suppose that you have a linked list describing things that
you planned to do today: "school" (go to school), followed by
"letter" (go to the post office
to send a letter), and "home" (go home). Then you realized that today
is Columbus Day, a federal holiday, so the post office is closed
and you cannot send a letter.
Draw, step-by-step, how you can delete the element
"letter" from the given linked list. Assume that we have a pointer p
that points to the previous element ("school").
- 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.