a) Arrays have better cache locality that can make them better in terms of performance
b) It is easy to insert and delete elements in Linked List
c) Random access is not allowed in a typical implementation of Linked Lists
d) Access of elements in linked list takes less time than compared to arrays
Answer: d
Explanation: To access an element in a linked list, we need to traverse every element until we reach the desired element. This will take more time than arrays as arrays provide random access to its elements.
Related Posts
Given an array of size n, let’s assume an element is ‘touched’ if and only if some operation is performed on it(for example, for performing a pop operation the top element is ‘touched’). Now you need to perform Dequeue operation. Each element in the array is touched atleast?
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
What does the following function do for a given Linked List with first node as head?
void fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf(“%d “, head->data);
}Linked list data structure offers considerable saving in _____________
In Linked List implementation, a node carries information regarding ___________
Linked list is considered as an example of ___________ type of memory allocation.
Linked lists are not suitable for the implementation of ___________
Join The Discussion