Name an advantage of array over linked list?
Answer Posted / shruthi
1. Arrays have continguous memory allocation which makes it
easy to access elements inbetween.
2. As memory is allocated during compilation makes the
program faster
3. Fixed in size so if we are aware of the exact size of
datas then there can be no memory wastage which is also an
advantage linked list has.
4. Insertion and deletion at the end of the array is easy
but not inbetween.
5. Accessing data is easy a[2] etc
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is the oops and benefits of oops programming?
write a C++ program for booking using constructor and destructor.
What are benefits of oop?
What is abstraction example?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
Why is destructor used?
Can we have inheritance without polymorphism?
What is difference between inheritance and polymorphism?
What is oops and why we use oops?
What is constructor overloading in oop?
Can you explain polymorphism?
What are the benefits of polymorphism?
write string class as your own class in java without using any built-in function
Why is polymorphism needed?
How is polymorphism achieved?