Data structure

22
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

description

Data structures..and ita applications..

Transcript of Data structure

Page 1: Data structure

In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

Page 2: Data structure

Data structure is a tool of various data structures like stack, queue, linked list etc. By using such data structures we are able to store the data into the computer in an organized manner, so that data retrieval can be fast later on.

Data structure help in data operations like storing data, searching particular data, deleting particular data etc.

Page 3: Data structure

To give the logical and mathematical description of structure of data.

To arrange the data in such a manner that all operations like insertion, deletion etc. can be efficiently performed on the data.

Page 4: Data structure

Array Stack Queue Linked list Tree Graph

Page 5: Data structure

In computer science, an array data structure or simply array is a data structure consisting of a collection of elements (values or variables), each identified by one or more integer indices, stored so that the address of each element can be computed from its index.

Page 6: Data structure

or simply

Page 7: Data structure

Arrays are used to implement mathematical vectors and matrices, as well as other kinds of rectangular tables. Many databases, small and large, consist of (or include) one-dimensional arrays whose elements are records.

Arrays are used to implement other data structures, such as heaps, hash tables, deques, queues, stacks, strings, and V Lists.

Page 8: Data structure

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.

Page 9: Data structure

In computer science, a stack is a last in, first out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element.

Page 10: Data structure

Push Pop

Page 11: Data structure

The push operation adds to the top of the list, hiding any items already on the stack, or initializing the stack if it is empty.

Page 12: Data structure

The pop operation removes an item from the top of the list, and returns this value to the caller. A pop either reveals previously concealed items, or results in an empty list.

Before pop After pop

Page 13: Data structure

A stack is a restricted data structure, because only a small number of operations are performed on it. The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition. Therefore, the lower elements are typically those that have been in the list the longest.

Page 14: Data structure

A queue is a particular kind of collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. This makes the queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed.

Page 15: Data structure
Page 16: Data structure

In computer science, a linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference.

Linked lists are among the simplest and most common data structures, and are used to implement many important abstract data structures, such as stacks, queues, hash tables, symbolic expressions, skip lists, and many more.

Page 17: Data structure
Page 18: Data structure

In computer science, a tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.

Page 19: Data structure

A Graph is a kind of data structure specially an abstract data type, that consist of a set of nodes and set of edges that establish relationship between the nodes.

In computer science, a graph is an abstract data structure that is meant to implement the graph concept from mathematics.

Page 20: Data structure
Page 21: Data structure
Page 22: Data structure