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
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
can inline function declare in private part of class?
What is class encapsulation?
Why do we need polymorphism in c#?
Why is there no multiple inheritance?
What is the point of oop?
What is overriding in oop?
how to get the oracle certification? send me the answer
What is meant by oops concept?
What is encapsulation oop?
Can we have inheritance without polymorphism?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
Advantage and disadvantage of routing in telecom sector
Why do we use encapsulation in oops?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer