Data Structure
Data Structure
SET-I
1.
A). What is a linked list? Discuss the algorithms for the insertion and deletion of values in the
beginning of a linked list.
Ans: A linked list is a data structure where the objects are arranged in a linear order. Unlike an array,
however, in which the linear order is determined by the array indices, the order in a linked list is determined
by a pointer in each object.
In case of a list being empty, we will return the updated head of the linked list because in this case, the
inserted node is the first as well as the last node of the linked list.
A 10 11 12 16 34 37 54 65
Output
Maximum value we can obtain = 240