Explore BrainMass

Explore BrainMass

    Inserting and deleting in a linked list

    This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

    1

    What is the algorithmic complexity associated with inserting or deleting an element at the beginning of a linked list?

    2

    What is the algorithmic complexity associated with inserting or deleting an element at the end of a linked list?

    3

    What is the maximum number of elements that can be inserted into a linked list?

    4

    Given a pointer to an internal node in a linked list (p), what are the steps involved in inserting a new node (q) immediately after it?

    5

    Given a pointer to an internal node in a linked list (p), what are the steps involved in deleting the node following p?