MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is/are the advantages of Linked list?
A
Insertion and deletion of elements can be done efficiently
B
It uses dynamic memory allocation
C
Memory utilization is efficient compared to arrays
D
None of the above
Explanation: 

Detailed explanation-1: -From a memory allocation point of view, linked lists are more efficient than arrays. Unlike arrays, the size for a linked list is not pre-defined, allowing the linked list to increase or decrease in size as the program runs.

Detailed explanation-2: -The advantages of linked lists include: Overflow can never occur unless the memory is actually full. Insertions and deletions are easier than for contiguous (array) lists. With large records, moving pointers is easier and faster than moving the items themselves.

Detailed explanation-3: -Linked lists are preferable over arrays when: you don’t need random access to any elements. you want to be able to insert items in the middle of the list (such as a priority queue)

Detailed explanation-4: -Hence, linked lists are more efficient than arrays both in sequential access (due to the presence of node) and in element rearranging. The correct answer is option (d).

Detailed explanation-5: -1. Advantages of linked list representation of binary trees over arrays? Explanation: It has both dynamic size and ease in insertion and deletion as advantages.

There is 1 question to complete.