Give code and the drawing to make clear what you are doing.

Here is a diagram of a three node linked list with a head pointer and a node to be inserted. Show all steps necessary to delete the second node, pointed to by discard_me. You may assume the necessary search for the node to be deleted is done and the pointer discard_me is already positioned.

You are to make clear the sequence of steps by either numbering the steps, or by making several copies of this drawing, with one change per drawing, numbered to show the sequence.

You may assume that a search routine taking a head pointer and data arguments has been defined for you.

```

NodePtr discard_me;

NodePtr temp_ptr;

```





Code:

```

NodePtr discard_me;

NodePtr temp_ptr;

discard_me = search( head, discard_data);

head->link = discard_me->link;

delete discard_me

```

Computer Science & Information Technology

You might also like to view...

Office Online services include Web-based versions of all of the following Microsoft products EXCEPT:

A) Word 2013. B) Excel 2013. C) Access 2013. D) PowerPoint 2013.

Computer Science & Information Technology

Impact printers operate on the same principle as a copy machine

Indicate whether the statement is true or false

Computer Science & Information Technology