Data struters

6
Data structures is representation of logical relationship exiting between individual elements of data

Transcript of Data struters

Page 1: Data struters

Data structures is representation of logical relationship exiting

between individual elements of data

Page 2: Data struters

in te rger floa t characte r po in te r

prim ita tive da ta structe r

array

stacks queues

liner lis t

lis t

g raphs trees

non-line r lis t

files

non-prim ita tive structe r

da ta stru te rsT ype title here

Page 3: Data struters

Primitive data structure• These are basic structures and directly

upon by the machine instructions.these in general, have different representation on different computers.

Page 4: Data struters

Non-primitive data structures• These are more sophisticated data

structures. These are derived from primitive data structures

• The non-primitive data structures emphasize on structuring of a group of homogeneous(same type) or non-homogeneous(different type) data items.

Page 5: Data struters

stacks

• Stack is non-primitive linear data structures. It is an ordered list in which addition of new data item and deletion of already exiting data items is done from only one end, know as top of stack (TOS).

• As all the deletion and insertion in a stack is done from top of the stack ,the last added element will be the first to be removed from the stack.

Page 6: Data struters

• Example :- a common model of a stack is plates in a marriage party or coin stacker. Fresh plates are “pushed” onto the top and “popped” of the top.