Jump to content

Data structure: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Tag: references removed
Replaced content with 'LOL'
Line 1: Line 1:
LOL
{{Refimprove|date=November 2009}}
{{Cleanup|date=November 2009}}

In [[computer science]], a '''data structure''' is a particular way of storing and organizing [[data]] in a [[computer]] so that it can be used [[algorithmic efficiency|efficiently]].<ref>Paul E. Black (ed.), entry for ''data structure'' in ''[[Dictionary of Algorithms and Data Structures]]. U.S.

Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, [[B-tree]]s are particularly well-suited for implementation of databases, while [[compiler]] implementations usually use [[hash table]]s to look up identifiers.

Data structures are used in almost every program or software system. Specific data structures are essential ingredients of many efficient algorithms, and make possible the management of huge amounts of data, such as large [[database]]s and [[web indexing|internet indexing service]]s. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design.

==Basic principles==
Data structures are generally based on the ability of a computer to fetch and store data at any place in its memory, specified by an [[physical address|address]] — a bit string that can be itself stored in memory and manipulated by the program. Thus the [[record (computer science)|record]] and [[Array data structure|array]] data structures are based on computing the addresses of data items with arithmetic operations; while the [[linked data structure]]s are based on storing addresses of data items within the structure itself. Many data structures use both principles, sometimes combined in non-trivial ways (as in [[XOR linked list|XOR linking]]).

==Abstract data structures==
The implementation of a data structure usually requires writing a set of [[subroutine|procedures]] that create and manipulate instances of that structure. The efficiency of a data structure cannot be analyzed separately from those operations.

This observation moves the theoretical concept of an [[abstract data type]], a data structure that is defined indirectly by the operations that may be performed on it, and the mathematical properties of those operations (including their space and time cost).

==Language support==
[[Assembly languages]] and some low-level languages such as [[BCPL programming language|BCPL]] generally lack support for data structures. Many [[high-level programming languages]], on the other hand, have special syntax or other built-in support for certain data structures, such as vectors (one-dimensional [[array data type|array]]s) in the [[C programming language]], multi-dimensional arrays in [[Pascal (programming language)|Pascal]], linked lists in [[Common Lisp (programming language)|Common Lisp]], and [[hash table]]s in [[Perl programming language|Perl]]. Many languages also provide basic facilities such as [[reference (computer science)|references]] and the definition [[record (computer science)|record]] data types, that programmers can use to build arbitrarily complex structures.

Most programming languages feature some sort of library mechanism that allows data structure implementations to be reused by different programs. Modern programming languages usually come with standard libraries that implement the most common data structures. Examples are the [[C++]] [[Standard Template Library]], the [[Java Collections Framework]], and [[Microsoft]]'s [[.NET Framework]].

Modern languages also generally support [[modular programming]], the separation between the [[interface (computing)|interface]] of a library module and its implementation. Some provide [[opaque data type]]s that allow clients to hide implementation details and pictures. [[Object-oriented programming language]]s, such as C++ and [[Java (programming language)|Java]], use [[class (computer science)|classes]] for this purpose.

With the advent of [[multi-core]] processors, many known data structures have [[concurrent data structure | concurrent]] versions that allow multiple computing threads to access the data structure simultaneously.

==See also==
{{Wikipedia-Books|Data structures}}
* [[Concurrent data structure]]
* [[Parallel data structure]]
* [[Linked data structure]]
* [[List of data structures]]
* [[Comparison of data structures]]
* [[Data model]]
* [[Data modeling]]
* [[Dynamization]]
* [[Persistent data structure]]

== References ==
{{reflist}}

* [[Niklaus Wirth]], ''Algorithms and Data Structures''
* [[Donald Knuth]], ''The Art of Computer Programming'', vol. 1. Addison-Wesley.
* [[Bill Viola]], ''Will There Be Condominiums in Data Space?''
* Dinesh Metha and [[Sartaj Sahni]] ''Handbook of Data Structures and Applications'', Chapman and Hall/CRC Press, 2007.

==External links==
{{wikibooks|Data Structures}}
{{Commons category|Data structures}}
* [http://nist.gov/dads/ Descriptions] from the [[Dictionary of Algorithms and Data Structures]]
* http://www.cse.unr.edu/~bebis/CS308/
* [http://www.cs.auckland.ac.nz/software/AlgAnim/ds_ToC.html Data structures course with animations]
* [http://courses.cs.vt.edu/~csonline/DataStructures/Lessons/index.html data structure tutorials with animations]
* [http://msdn.microsoft.com/en-us/library/aa289148(VS.71).aspx An Examination of Data Structures]
* [http://www.collectionspy.com CollectionSpy] &mdash; A profiler and viewer for Java's standard data structure classes (see [[Java Collections Framework]])

{{Data structures}}
{{DEFAULTSORT:Data Structure}}
[[Category:Data structures|*]]

[[ar:بنية البيانات]]
[[ast:Estructura de datos]]
[[bs:Struktura podataka]]
[[ca:Estructura de dades]]
[[da:Datastruktur]]
[[de:Datenstruktur]]
[[es:Estructura de datos]]
[[fa:ساختمان داده‌ها]]
[[fr:Structure de données]]
[[ko:자료 구조]]
[[id:Struktur data]]
[[is:Gagnagrind]]
[[it:Struttura dati]]
[[he:מבנה נתונים]]
[[lv:Datu struktūra]]
[[hu:Adatszerkezet]]
[[ml:ഡാറ്റാ സ്ട്രക്‌ച്ചര്‍]]
[[ms:Struktur data]]
[[nl:Datastructuur]]
[[ja:データ構造]]
[[no:Datastruktur]]
[[pl:Struktura danych]]
[[pt:Estrutura de dados]]
[[ro:Structură de date]]
[[ru:Структура данных]]
[[simple:Data structure]]
[[sk:Údajová štruktúra]]
[[sl:Podatkovna struktura]]
[[sr:Структура података]]
[[fi:Tietorakenne]]
[[sv:Datastruktur]]
[[th:โครงสร้างข้อมูล]]
[[tr:Veri yapıları]]
[[uk:Структури даних]]
[[vi:Cấu trúc dữ liệu]]
[[zh:数据结构]]

Revision as of 10:19, 4 January 2010

LOL