Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Array (data structure)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Applications== Arrays are used to implement mathematical [[coordinate vector|vectors]] and [[matrix (mathematics)|matrices]], as well as other kinds of rectangular tables. Many [[database]]s, small and large, consist of (or include) one-dimensional arrays whose elements are [[record (computer science)|record]]s. Arrays are used to implement other data structures, such as lists, [[heap (data structure)|heaps]], [[hash table]]s, [[double-ended queue|deque]]s, [[queue (data structure)|queue]]s, [[stack (data structure)|stacks]], [[String (computer science)|strings]], and VLists. Array-based implementations of other data structures are frequently simple and space-efficient ([[implicit data structure]]s), requiring little space [[Overhead (computing)|overhead]], but may have poor space complexity, 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 in-program [[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 <code>IF</code> statements. They are known in this context as [[control table]]s 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]] [[Pointer (computer programming)|pointers]] (or relative subroutine numbers that can be acted upon by [[Switch statement|SWITCH]] statements) that direct the path of the execution.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Array (data structure)
(section)
Add topic