Give pseudocode for inserting a node in front of the head node in a linked list.

What will be an ideal response?


1) Create a dynamic variable for the node to be inserted, pointed to by temp_ptr:
```
temp_ptr = new NodeType;
```
2) Set the data members of the node
3) make the link field of the new node point to the first node (head node) of the list.
4) make the head pointer point to the new node.

Computer Science & Information Technology

You might also like to view...

The element in a foreach statement _____.

a) must be of type int b) must be of (or convertible to) the same type as the collection or array type c) must be of type ArrayList d) None of the above.

Computer Science & Information Technology

Word's ________ contains commands that allow you to edit, share, and print your documents

A) Insights pane B) status bar C) Ribbon D) Quick Access Toolbar

Computer Science & Information Technology

When an error occurs in a Ruby program, an exception object is generated and information about the error is assigned to it.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A good authentication technology should be platform and system dependent.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology