American Journal of Computer Science and Engineering Survey Open Access

  • ISSN: 2349-7238
  • Journal h-index: 9
  • Journal CiteScore: 1.72
  • Journal Impact Factor: 1.11
  • Average acceptance to publication time (5-7 days)
  • Average article processing time (30-45 days) Less than 5 volumes 30 days
    8 - 9 volumes 40 days
    10 and more volumes 45 days

Commentary - (2021) Volume 9, Issue 3

Data Structures and Applications in Arrays

Nilam Verma*

Department of Computer Science & Engineering, HR Institute of Technology, Pune, India

*Corresponding Author:
Nilam Verma
Department of Computer Science & Engineering
HR Institute of Technology
Pune
India
E-mail: nilam.verma.ak@gmail.com

Received Date: April 27, 2021; Accepted Date: May 11, 2021; Published Date: May 18, 2021

Citation: Verma N (2021) Data Structures and Applications in Arrays. Am J Comput Sci Eng Surv Vol. 9 No. 3:21.

Visit for more related articles at American Journal of Computer Science and Engineering Survey

Description

Array data structure

In computer an array data structure, or simply an array, is a data structure that consists of a collection of elements (values or variables), each of which is identified by at least one array index or key in science. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called one-dimensional array.

An array of ten 32-bit (4-byte) integer variables with indices 0 through 9 may, for example, be stored as ten words at memory addresses 2000, 2004, 2008,..., 2036. hexadecimal: 0x7D0, 0x7D4, 0x7D8, ..., 0x7F4) so that the element with index i has the address 2000 + (i × 4).[4]

The memory address of the first element of an array is called first address, foundation address, or base address.

Two-dimensional arrays are sometimes referred to as matrices since the mathematical concept of a matrix can be expressed as a double grid. In some cases the term "vector" is used in computing to refer to an array, although tuples rather than vectors are the more mathematically correct equivalent. Tables, especially lookup tables, are frequently implemented as arrays; the word table is occasionally used as a synonym for array.

Arrays are one of the oldest and most significant data structures, and practically every programme uses them. They are also used to implement many other data structures, such as lists and strings. In most modern computers and many external storage devices, the memory is a one-dimensional array of words, whose indices are their addresses. Processors, especially vector processors, are often optimized for array operations.

Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. While the array is in use, the set of valid index tuples and the addresses of the elements (and hence the element addressing formula) are usually, but not always, fixed.

The term array is often used to mean array data type, a kind of data type provided by most high-level programming languages that consists of a collection of values or variables that can be selected by one or more indices computed at run-time. Array types are frequently represented by array structures, although they can also be implemented by hash tables, linked lists, search trees, or other data structures in some languages. The term is also used, especially in the description of algorithms, to mean associative array or "abstract array"; a theoretical computer science model (an abstract data type or ADT) intended to capture the essential properties of arrays.

Applications of Array

Arrays are used to implement mathematical vectors and matrices, as well as other kinds of rectangular tables. Many databases, large and small, are made up of (or include) onedimensional arrays with records as their elements. Arrays are used to implement other data structures, such as lists, heaps, hash tables, deques, queues, stacks, strings, and V Lists. Other data structures implemented using arrays are typically simple and space-efficient, needing little space overhead, but they may have poor space efficiency particularly when modified; compared to tree-based data structures (compare a sorted array to a search tree).

One or more large arrays are sometimes used to emulate inprogram dynamic memory allocation, particularly memory pool allocation. Historically, this has sometimes been the only way to allocate "dynamic memory" portably.

Arrays can be used to determine partial or complete control flow in programs, as a compact alternative to (otherwise repetitive) multiple IF statements. They are known in this context as control tables and are used in conjunction with a purpose built interpreter whose control flow is altered according to values contained in the array. The array may contain subroutine pointers (or relative subroutine numbers that can be acted upon by SWITCH statements) that direct the path of the execution.