Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dynamic array
(section)
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!
{{Short description|List data structure to which elements can be added/removed}} [[File:Dynamic array.svg|thumb|Several values are inserted at the end of a dynamic array using geometric expansion. Grey cells indicate space reserved for expansion. Most insertions are fast ([[constant time]]), while some are slow due to the need for [[Memory management|reallocation]] ({{math|Ξ(''n'')}} time, labelled with turtles). The ''logical size'' and ''capacity'' of the final array are shown.]] In [[computer science]], a '''dynamic array''', '''growable array''', '''resizable array''', '''dynamic table''', '''mutable array''', or '''array list''' is a [[random access]], variable-size [[list data structure]] that allows elements to be added or removed. It is supplied with [[standard libraries]] in many modern mainstream [[programming language]]s. Dynamic arrays overcome a limit of static [[array data type|arrays]], which have a fixed capacity that needs to be specified at [[Memory management|allocation]]. A dynamic array is not the same thing as a [[dynamic memory allocation|dynamically allocated]] array or [[variable-length array]], either of which is an array whose size is fixed when the array is allocated, although a dynamic array may use such a fixed-size array as a back end.<ref name="java_util_ArrayList">See, for example, the [http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/e0e25ac28560/src/share/classes/java/util/ArrayList.java source code of java.util.ArrayList class from OpenJDK 6].</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)