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
Structure
(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!
== Data == {{Main|Data structure}} [[File:Singly-linked-list.svg|thumb|right|In a singly linked list, each element has a data value and a pointer to the next element.]] In [[computer science]], a data structure is a way of organizing information in a [[computer]] so that it can be used efficiently.<ref>{{cite encyclopedia |first=Paul E. |last=Black |title=data structure |encyclopedia=[[Dictionary of Algorithms and Data Structures]] |editor-first1=Vreda |editor-last1=Pieterse |editor-first2=Paul E. |editor-last2=Black |publisher=[[National Institute of Standards and Technology]] |date=15 December 2004 |url=http://xlinux.nist.gov/dads/HTML/datastructur.html |edition=Online |access-date=1 October 2015 |archive-date=10 August 2017 |archive-url=https://web.archive.org/web/20170810051100/https://xlinux.nist.gov/dads/HTML/datastructur.html |url-status=live }}</ref> Data structures are built out of two basic types: An [[Array data structure|array]] has an index that can be used for immediate access to any data item (some [[programming language]]s require array size to be [[Initialization (programming)|initialized]]). A [[linked list]] can be reorganized, grown or shrunk, but its elements must be accessed with a [[Reference (computer science)|pointer]] that links them together in a particular order.<ref>{{cite book|last1=Sedgewick|first1=Robert|last2=Wayne|first2=Kevin|title=Algorithms|date=2011|publisher=Addison-Wesley Professional|isbn=9780132762564|edition=4th}}</ref>{{rp|156}} Out of these any number of other data structures can be created such as [[Stack (abstract data type)|stacks]], [[Queue (abstract data type)|queues]], [[Tree (data structure)|trees]] and [[hash table]]s.<ref>{{cite book|chapter=Data structures|last1=Cormen|first1=Thomas H.|last2=Leiserson|first2=Charles E.|last3=Rivest|first3=Ronald L.|last4=Stein|first4=Clifford|title=Introduction to algorithms|url=https://archive.org/details/introductiontoal00corm_805|url-access=limited|date=2009|publisher=MIT Press|location=Cambridge, Massachusetts|isbn=978-0262033848|pages=[https://archive.org/details/introductiontoal00corm_805/page/n249 229]β339|edition=3rd}}</ref><ref>{{cite book|last1=Mehta|first1=Dinesh P.|chapter=Basic structures|editor-last1=Mehta|editor-first1=Dinesh P.|editor-last2=Sahni|editor-first2=Sartaj|title=Handbook of data structures and applications|date=2005|publisher=Chapman & Hall/CRC Computer and Information Science Series|location=Boca Raton, Fla.|isbn=9781420035179}}</ref> In solving a problem, a data structure is generally an integral part of the [[algorithm]].<ref name=Skiena>{{cite book|last1=Skiena|first1=Steven S.|chapter=Data structures|title=The algorithm design manual|url=https://archive.org/details/algorithmdesignm00skie_772|url-access=limited|date=2008|publisher=Springer|location=London|isbn=9781848000704|pages=[https://archive.org/details/algorithmdesignm00skie_772/page/n377 366]β392|edition=2nd}}</ref>{{rp|5}} In modern programming style, algorithms and data structures are [[Encapsulation (computer programming)|encapsulated]] together in an [[abstract data type]].<ref name=Skiena/>{{rp|ix}}
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)