10 DEfinition of Data Structure:
1. data structure ((computer science) the organization of data (and its storage allocations in a computer))
2. A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data.
3. (computer science) An organization in software of
data that allows more optimal
searching, categorizing, or
storage of
information.
4. The internal data representation of an implementation.
5. A model of a collection of data items that are related or “structured” in some way.
6. A means of representing a real-life entity (such as an invoice) inside a computer. Computer programmers create data structures to model real world entities.
7. Description of the way in which information is organized within a database
8. An organised aggregate of data items.
9. This is a set of data in memory comprised of fields,
10. A logical relationship among data elements that is designed to support specific data manipulation functions.
3 other types of data structures:
1. Heap
For “the heap” as a large pool of unused memory, see
Dynamic memory allocation. In
computer science, a heap is a specialized
tree-based
data structure that satisfies the heap property: if B is a
child node of A, then key(A) ≥ key(B). This implies that an element with the greatest key is always in the root node, and so such a heap is sometimes called a max heap. (Alternatively, if the comparison is reversed, the smallest element is always in the root node, which results in a min heap.) This is why heaps are used to implement
priority queues. The efficiency of heap operations is crucial in several
graph algorithms.
The operations commonly performed with a heap are
delete-max or delete-min: removing the root node of a max- or min-heap, respectively
increase-key or decrease-key: updating a key within a max- or min-heap, respectively
insert: adding a new key to the heap
merge: joining two heaps to form a valid new heap containing all the elements of both.
Heaps are used in the sorting algorithm
heapsort.
2. Zipper
Zipper is a
purely functional data structure used in
functional programming to solve some problems in a way that uses notions like “context” and “hole”. It is related to the
generalization of the notion of “derivative” (for types). The zipper was described by
Gerard Huet in 1997. It has some conceptual similarity to the
gap buffer technique sometimes used with arrays.
Zippers are multidimensional in the sense that they can be used as
lists or
trees by placing
additional restrictions upon them. Such derived data structures are usually referred to by saying a tree with zipper or a list with zipper to give the image that the structure is a tree or a list, with a zip slider attach to it as an afterthought.
While zipper is a functional structure and is often used from within a functional language equipped with extensive type checking, there is no reason why it would not be suitable for use with many procedural languages as well. Many procedural languages even support functional programming to some degree. A minimal list with zipper example is described below in
Python. The example is only used to present the core idea and is not provided as a guide for actually implementing a zipper.
cursor = [ [0,1,2], 3, [4,5,6,7,8,9] ]
The structure is named cursor because its value is a list with focus set on value 3. Technically it is (at top level) a list with exactly three values([0,1,2], 3 and [4,5,6,7,8,9]). This list starts with a list of elements ([0,1,2]) that precede the element with current focus, then as the second element it contains the element with focus (3) and finally it contains another list ([4,5,6,7,8,9]) with the elements that follow the element with current focus.
3. Scene Graph
A scene graph is a general
data structure commonly used by
vector-based graphics editing applications and modern computer games. Examples of such programs include
AutoCAD,
Adobe Illustrator,
Acrobat 3D,
OpenSceneGraph and
CorelDRAW.
The scene graph is a structure that arranges the logical and often (but not necessarily) spatial representation of a graphical scene. The definition of a scene graph is fuzzy because programmers who implement scene graphs in applications and in particular the games industry take the basic principles and adapt these to suit particular applications. This means there is no hard-and-fast rule as to what a scene graph should be.
A scene graph is a collection of nodes in a
graph or
tree structure. A node may have many children but often only a single parent, with the effect of a parent apparent to all its child nodes; an operation applied to a group automatically propagates its effect to all of its members. In many programs, associating a geometrical
transformation matrix (see also
transformation and
matrix) at each group level and concatenating such matrices together is an efficient and natural way to process such operations. A common feature, for instance, is the ability to group related shapes/objects into a compound object which can then be moved, transformed, selected, etc. as easily as a single object.
It also happens that in some scene graphs, a node can have a relation to any node including itself, or at least an extension that refers to another node (for instance
Pixar's
PhotoRealistic RenderMan because of its usage of
Reyes rendering algorithm, or
Adobe Systems's
Acrobat 3D for advanced interactive manipulation).
linked list
Our Data Structure: Link List
In
computer science, a linked list is one of the fundamental
data structures, and can be used to implement other data structures. It consists of a sequence of
nodes, each containing arbitrary data
fields and one or two
references ("links") pointing to the next and/or previous nodes. The principal benefit of a linked list over a conventional
array is that the order of the linked items may be different from the order that the data items are stored in memory or on disk, allowing the list of items to be traversed in a different order. A linked list is a self-referential datatype because it contains a pointer or link to another datum of the same type. Linked lists permit insertion and removal of nodes at any point in the list in constant time,
[1] but do not allow
random access. Several different types of linked list exist: singly-linked lists, doubly-linked lists, and circularly-linked lists.Linked lists can be implemented in most languages. Languages such as
Lisp and
Scheme have the data structure built in, along with operations to access the linked list. Procedural or object-oriented languages such as
C,
C++, and
Java typically rely on mutable
references to create linked lists.