Page 124 - DCAP407_DATA_STRUCTURE
P. 124
Unit 6: Linked List Operations
2. Fill in the blanks:
(a) ………………………… operation involves iterating through every element in a list to arrange
the data in a specific order.
(b) While inserting an element in the list ………………………… operation has to be performed.
(c) ………………………… keyword is used to clear the data present in a variable.
(d) In search operation, every element in the list is associated with a…………………………
3. Select a suitable choice for every question:
(a) In search operation, every element in the list is searched using a ……………………
(i) Key
(ii) Pointer
(iii) Address
(iv) Link
(b) Which of the following operations are performed if the list is not empty?
(i) The address of the next node is assigned to the HEAD node.
(ii) The address of the next node is assigned to NULL.
(iii) The address of the next is assigned to temp variable.
(iv) The address of the previous node is assigned to NULL.
6.8 Review Questions
1. “List traverse operation forms the basis for other operations such as, reversing and sorting of list
elements.” Analyze.
2. “In a doubly-linked list, insertion and deletion takes more time than linear linked list.” Analyze.
3. “Using a head node is essential while performing linked list operations.” Discuss.
4. “It is possible to insert an element anywhere in the linked list”. Justify
Answers: Self Assessment
1. (a) True
(b) False
(c) False
(d) False
(e) False
2. (a) Traversing
(b) Incrementing
(c) Free
(d) Key element
3. (a) Key
(b) The address of the next node is assigned to the HEAD node
LOVELY PROFESSIONAL UNIVERSITY 117