answersLogoWhite

0

The major benefit of an array is that it provides constant time random access to any element in the array. For static arrays (fixed size), memory consumption is also optimal. Dynamic arrays can be just as optimal in terms of memory consumption, however, performance will suffer whenever the array needs to be re-allocated and/or elements need to be moved within the array. Allocating several elements at a time can alleviate much of this problem, however memory consumption becomes less than optimal. Where random access is not an issue, list structures are more beneficial in terms of both performance and memory consumption.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What are benefits of array in java?

array example in java


Benefits for being a vet?

The benefits of being a vet including working with animals. Another benefit is developing relationships with a large array of people.


Differentiate single dimensional array to double dimensional array?

A single dimensional array is an array of items. A two-dimensional array is an array of arrays of items.


What is meant by irregular dimensional array?

An irregular dimensional array is a special type of multi-dimensional array.First we must understand that a multi-dimensional array is just an array of arrays. Each element in the array is, itself, an array of elements.A regular multi-dimensional array will be an array of size n, with each element containing a separate array of size m. That is, each sub-array has the same size.An irregular multi-dimensional array will be a multi-dimensional array in which each sub-array does not contain the same number of elements.Regular array:array[0] = new array{0, 1, 2}array[1] = new array{3, 4, 5}array[2] = new array{6, 7, 8}array[3] = new array{9, 10, 11}This regular array is an array of size 4 in which each sub-array is of size 3.Irregular array:array[0] = new array{0, 1, 2}array[1] = new array{3, 4}array[2] = new array{5, 6, 7}array[3] = new array{8, 9, 10, 11}This irregular array is an array of size 4 in which the size of each sub-array is not the same.


How do you swap two adjecent no in array in c?

Option 1) Use a temporary variable: int x = array[i]; array[i] = array[i+1]; array[i+1] = x; Option 2) Use bit operators: array[i] ^= array[i+1] ^= array[i];


What are the benefits of makeup school?

A degree in makeup can qualify you for an array of jobs relating to cosmetology. Not only will you be more marketable with a degree, you will find that the salary is better.


What is array literal in as2?

An array literal is a comma-separated list of the elements of an array. An array literal can be used for initializing the elements of an array.


How do you swap rows in 2 dimensional array in Java?

[]temp = array[1] array[2]=array[1] array[1]=[]temp


Why the array is starting from zero?

By design; it makes the compiler's work easier. 1-based array's addressing-function: Address (array, index) = Address (array) + (index-1)*Elemsize(array) 0-based array's addressing-function: Address (array, index) = Address (array) + index*Elemsize (array)


What is the array function in CAD?

there r 2 types of array in cad - rectangular array and polar array...........


Will an array element be deleted when you retrieve it from the array?

You cannot delete from an array.


What is sparce array?

sparse array is one which has contents lower than its maximum size, that is the array has free or empty locations....