Computer Science, asked by nelson00, 11 months ago

what are the advantages and disadvantages of array in data structures

Answers

Answered by Shreyash9823
1

Answer:

First of all i would like to tell you that it is the main question that is asked in every interview.

Arrays are basically a collection of similar type of data in a contiguous memory location under one name.

Advantages-

collection of similar types of data.

if we want to store the marks of all students it will easy to store in array otherwise we have to store marks in different different location, which is not easy to memorise.

we have to only remember the first index of array.

used to implement other data structure like linked lists,stack,queue, trees, graph etc.

2 Dimensional array is used to represent a matrix.

DISADVANTAGES

Time complexity increase in insertion and deletion operation.

wastage of memory because arrays are fixed in size.

if there is enough space present in the memory bt not in contiguous form , in this case you will not able initialize your array.

it is not possible to increase the size of the array, once you had declared the array

Similar questions