adspace
What are the advantages of linked list over an array?
Answer Posted / Dheeraj Pal Singh
Linked lists and arrays are both important data structures with their own unique benefits. Here are some advantages of linked lists compared to arrays:
1. Dynamic Size: Unlike arrays, linked lists can grow or shrink dynamically during runtime as elements are added or removed.
2. Memory Efficiency: Linked lists use memory more efficiently for large lists because they don't need to store empty elements when the list size changes.
3. No Contiguous Memory Needed: Linked lists do not require contiguous blocks of memory, which can be an advantage in some systems with fragmented memory.
4. Insertion and Deletion Operations: Linked lists allow for efficient insertion and deletion operations at arbitrary positions without affecting the rest of the list.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program for Sorting an Array. Which sorting will you prefer?
For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX.
Draw a binary Tree for the expression : A * B - (C + D) * (P / Q)
Can you declare an array without assigning the size of an array?
What sort of serious problems have you experienced, and how have you handled them?
“int a[] = new int[3]{1, 2, 3}” – This a legal way of defining the arrays?