Name an advantage of array over linked list?
Answer Posted / fias
Array data structure stored in stack memory, which means we
have allocation done at compile time and there is no complex
memory management required. Performance would be better if
we use array, but size is limited, we need to decide at
compile time.
Where as, linked lists are dynamic memory allocation, it
stored in Heap memory. Very flexible to handle it. But, it
requires memory management as we request more memory or
release memory at run time. Linked lists are best choice if
we don't know the memory requirement at run time.
| Is This Answer Correct ? | 10 Yes | 12 No |
Post New Answer View All Answers
Can abstract class have normal methods?
What is abstraction in oop with example?
What is object in oop?
What does enum stand for?
what type of question are asked in thoughtworks pair programming round ?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is object and class in oops?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
can we make game by using c
What is difference between data abstraction and encapsulation?
What is encapsulation oop?
What is the purpose of polymorphism?
What is difference between pop and oop?
What does and I oop and sksksk mean?
Which is better struts or spring?