Name an advantage of array over linked list?
Answers were Sorted based on User's Feedback
Answer / gurpreet kaur
In arrays memory requirement is less as a refrence is not
required whereas memory for the data as well as for the
pointer is required and hence the overhead.
Arrays allow random access, any element can be accessed
using the subscript whereas linked lists allow sequential
access, accessing of any element requires processing of the
list from the beginning upto the element.
Is This Answer Correct ? | 17 Yes | 4 No |
Answer / 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 |
Answer / s.a. babu
an array can be created easily and quickly just by
declaration.
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / dinesh jalandhar
we can use binary search in case of array , which is not
possible in case of linklist........because in linklist it
is not possible to access the middle element of linklist
directly
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / upasna
Function of bubble sort can not be performed in link list
which is quite easy to perform in arrays
Is This Answer Correct ? | 15 Yes | 10 No |
Answer / atul kumar gupta
1-:array is working the concept of sequential.but linked
list is not provid the go directaly access the any alement.
2-:linked list are very complicated comparing the array
becouse the consist the two part which frst part is contain
the item and second is contain address of next node,so that
these are complicated compare then array.
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / aditi
Arrays are of types one ,2,multi dimensional but link list
have types singleand doubly which further has types
circular,header,circular header link list.
Is This Answer Correct ? | 9 Yes | 5 No |
Answer / nisha
Addresing is possible in case of arrays where as in linked list sequential address is possible
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / p.madhupriya
arrays are static in nature, therefore all operations
like memory allocation occur at the time of compilation
only. So processor has to put less effort at its runtime .
linkedlist uses dynamic memory allocation
Is This Answer Correct ? | 4 Yes | 0 No |
In multiple inheritance , to create sub class object , is there need to create objects for its superclasses??? in java and c++ both. Actually i have some information that is , all available members from its superclasses , memory created in subclass obj , so no need to create object for its superclasses...??? Thanks in Advance
hi all..i want to know oops concepts clearly can any1 explain??
Why is abstraction needed?
What is static in oop?
why c++ is called OOPS? waht is inherutance? what is compiler?
What is polymorphism explain its types?
i have to create a view in SQL as like in ORACLE DATA EXPRESS EDITION
How many types of access specifier in c# and vb.net?
what is function overloading..?
Write on signed and unsigned integers and give three (3) examples each
what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me
Why and when is a virtual destructor needed?