DREAM VALLEY COLLEGE   FOR GIRLS CENTRE  FOR  EDUCATIONAL  EXECELLENCE ADD:-Near Railway spring factory, Sitholi , Gwalior (MP) AFFILATED TO:- JIWAJI UNIVERSITY (strictly according to jiwaji university)
PPT PRESENTATION  On DATA STRUCTURE BCA  2nd  semester PRESENTED BY GUIDED BY HARISH SIR
INDEX ARRAY LINKED LIST QUEUES TREES GRAPHS SEARCH IT OUT STACK ARRAY STACK LINKEDLIST QUEUES TREES GRAPHS -
Array is vital part of programming. It allows user to stored multiple value in single variable. Array stored in contiguous form in memory. INTRODUCTION TO ARRAY
A B C F E D Array representation on memory OR  INSERTION OF ELEMENT IN THE ARRAY
operation performred on array Traversal:- processing each element in the array . Search:- finding a location of an element in the given value. Insertion:- adding new element in array. deletion:- removing an element in array. Sorting:- arranging element in array. Merging:- combining two array in single array. Reversing:- reversing the element of array.
A B C D E F DELETION OF ELEMENT IN THE ARRAY Delete (F) from the array. Delete (E) from the array. Delete (D) from the array. Delete (C) from the array. Delete (B) from the array. Delete (A) from the array.
TREES IN DATA STRUCTURE DREAM VALLEY GROUP OF COLLEGE ADD-NEAR RAILWAY SPRING FACTORY QUARTERS PHONE-2469990
TREES IN DATA STRUCTURE PRESENTED BY- GUIDED BY- HARISH SIR PUJA AND SHAIFALI
TOPIC COVERED WHAT IS TREE ROLE OF TREE IN DATA STRUCTURE BUILDING A SIMPLE TREE TYPES OF TREES BUILDING A BINARY TREE INORDER PRE ORDER POST ORDER ARRAY LINKED LIST
WHAT IS TREE TREES BRANCHES LEAVES ETC
NATURE IS A MAN'S BEST TEACHER  IF YOU UNDRESTAND THE CONCEPT OF TREE IT MEANS SIMPLE TREE --> CHILD NODE <- ROOT NODE/PARENT NODE
BUT IN DATASTRUCTURE TREE IS CREATED LIKE THIS BUT IN  REVERSE FORM --> TREES IN REVERSE FORM -> child node <- root node
IN A TREE STRUCTURE,HOWEVER EACH NODE MAY POINT TO SEVERAL NODE.
Binary tree->binary tree is defined as finite set of node in which number of the children  of a node should not exceed more than two .it means  the degree of binary tree not then greater then two .
BINARY TREE A B C D E F G THIS IS A BINARY TREE ROOT NODE CHILD NODE BRANCHES
TYPES OF BINARY TREE STRICTLY BINARY TREE COMPLETE BINARY TREE EXTENDED BINARY TREE
In every non terminal node in a binary tree consists of non empty left subtree and right subtree ,then such a tree is called strictly binary tree . STRICTLY BINARY TREE
STRICTLY BINARY TREE A B D E C F G NON TERMINAL NON TERMINAL
Complete binary tree The level of all nodes  of complete binary tree is equal .
A B C D E F G complete binary tree 0 1 2 THESE ARE LEVEL OF COMPLETE BINARY TREE AND THE LEVEL OF THIS COMPLTE BINARY  TREE IS 2
building a binary tree element are to be added 20 7 26 8 18 6 28 20 20 is a root node of this tree > 7 7 is compared with 20 7 > 26 26 is compared with  20 26 7 AND 26 IS CHILD NODE OF THE ROOT TREE > 8 8 IS COMPARED TO 26 THEN COMPARED TO 7 > 8 8 > 6 6 IS COMPARED WITH 20 AND 7 > 6 6 < 18 < 18 18 18 IS COMPARED WITH 20 AND 26 > 28 > 28 28 IS COMPARED WITH 20 AND 26 28 THIS IS THE BUILDING OF BINARY TREE THEN.. TRAVERSAL OF A BINARY TREE
printing the data in in-order trversal To traverse a non empty binary tree in in-order following three operations are performed  Traverse the left sub –tree in in-order Visit the root node Traverse the right sub-tree in in-order A B C D E F G TRVERSE STARTS FROM THE ROOT NODE Since D is the leaf node ,it gets printed ,which is the left child of D. D Now B gets printed as it is the parent of the node D B Since E is the leaf node ,it gets printed ,which is right child of B   E Now A gets printed as it is the parent of the node B A Since F is the leaf node ,it gets printed ,which is the left child of c F Now C gets printed as it is the parent of the node F C Since G is leaf node ,it gets printed ,which the right child of C G In order traversal
Post -order traversal Printing the data in post-order traversal To traverse a non empty binary tree in in-order following three operations are performed  Traverse the left sub –tree in in-order Visit the root node Traverse the right sub-tree in in-order A B C D E F G Now A gets printed as it is the parent of the node B Now C gets printed as it is the parent of the node F Since D is the leaf node ,it gets printed ,which is the left child of D. TRVERSE STARTS FROM THE ROOT NODE Now B gets printed as it is the parent of the node D D E B Now F gets printed as it is the left child of C F G C A Since E is the leaf node ,it gets printed ,which is right child of B Now G gets printed ,as it is the right child of C
a non empty binary tree in pre-order following three operations are performed To traverse  Visit the root node Traverse the left sub –tree in pre-order Traverse the right sub-tree in pre-order Pre-order traversal A B C D E F G Printing the data in pre-order traversal Traversal starts from the root node The data at the root node i.e. A gets printed A Since D is the leaf node ,it gets printed ,which is the left child of B. D Now B gets printed as it is the parent of the node D B Since E is the leaf node ,it gets printed , which is right child of B   E Now C gets printed as it is the parent of the node F C Since F is the leaf node ,it gets printed , which is the left child of c F Since G is leaf node ,it gets printed , which the right child of C G
Representation of a binary trees in memory ->there are two ways by which we can represent a binary tree LINKED LIST ARRAY ARRAY LINKED LIST
BINARY TREE CAN BE REPRESENTED BY LINKS WHERE EACH NODE   CONTAINS THE ADDRESS OF THE LEFT CHILD AND THE RIGHT CHILD
LINKED LIST REPRESENTATION LEFT DATA RIGHT NODE
LINKED LIST REPRESENTATION A B C D E H F G THE NODE D,E,F,G AND H CONTAIN A NULL  VALUE IN BOTH THEIR LINK FIELD AS THESE  ARE THE LEAF
ARRAY REPRESENTATION  OF BINARY TREE WHEN A BINARY TREE IS REPRESENTATED BY ARRAY THREE SEPRATE ARRAY  IS REQUIRED ONE ARRAY ARR STORE DATA FEIDS OF THE TREE THE OTHER TWO ARRAY ARE  LC AND RC I.E...... LEFT  AND  RIGHTCHILD
ARRAY REPRESENTATION AR A B C D E F LC 1 2 3 4 5 6 RC 2 6 8 4 9 7 ARRAY
PPT PRESENTATION ONSTACK DATA STRUCTURE BCA  2nd  semester Dept. of computer science Presented by:-  Guided by:- RICHA MITTAL   HARISH SIR RANI KUSHWAH
CONCEPT OF STACK
Topic Covered Introduction . Working of stack Push operation performed on stack Pop operation performed on stack Infix to prefix Infix to postfix Prefix to postfix Postfix to infix
A Stack is a linear collection of data in which new item may be inserted and  deleted at one end. It sometimes called LIFO and push down list . A stack is usually represented by computer by block of memory cells. Thus, stack data structure implemented (LIFO) property. The situation of LIFO may be compared as the plates of cafeteria where every new plate will added at the top.  INTRODUCTION TO STACK
Working of stack Stacks associated with two basic operation i.e PUSH and POP. Push function means addition of element to the stack. Pop function means remove an element from the top op the stack.
23 41 25 36 12 Push Operation on  stack  ( PUSH ) INSERT 41 TO STACK ( PUSH ) INSERT 23 TO STACK ( PUSH ) INSERT 25 TO STACK ( PUSH ) INSERT 36 TO STACK ( PUSH ) INSERT 12 TO STACK STACK
23 41 25 36 12 POP OPERATION ON STACK ( POP ) DELETE 12 FROM THE STACK ( POP ) DELETE 36 FROM THE STACK ( POP ) DELETE 25 FROM THE STACK ( POP ) DELETE 23 FROM THE STACK ( POP ) DELETE 41 FROM THE STACK STACK
EXPRESSION :-   A  +  B  *  C C * B + A scan CONVERSION OF INFIX TO PREFIX NOTATION STACK INFIX PREFIX Character  (C) scanned Operator(*) scanned Push (*) into the stack Character (B) scanned Priority of(*)is higher than (+),so(*) operator is poped from the stack Character(A) Scanned Pop(+) from the stack
CONVERSION OF INFIX TO POSTFIX NOTATION EXPRESSION :-   A  +  B  *  C STACK A + B * C INFIX SCAN POSTFIX Character(A) scanned Operator(+) scanned Character (B) scanned Operator (*) scanned Character (c) Scanned Priority of (*) is high, pop(*) from the stack  pop (+) from the stack
CONVERSION OF PREFIX TO POSTFIX NOTATION EXPRESSION :-  +  A  *  B  C C B * A + scan PREFIX POSTFIX STACK OPERATOR (+)SCANNED CHARACTER (A) SCANNED OPERATOR (*)SCANNED CHARACTER(B) SCANNED CHARACTER (C)SCANNED Priority of (*) is higher than (+) ,pop (*) from the stack Pop (+) from the stack
CONVERSION OF POSTFIX TO INFIX NOTATION EXPRESSION :-  A  B + C  * SCAN A B + C * Operator(*) scanned, push to the stack Character (C)  scanned Operator(+) scanned Priority of (*) is higher than (+),so (*) is pop from the stack Push (+) to the stack Scanned character (B) Pop (+) from the stack Character (A) scanned POSTFIX STACK INFIX
THANK YOU
INTRODUCTION OF QUEUE
CONCEPT OPERATIONS ON QUEUE
  CONCEPT LINEAR DATA STRUCTURE PRINCIPLE :-  First in First out DEFINATION :-  Ordered collection of items in a linear way.
QUEUE AS A SINGLE   LINE
QUEUE ON GAME    STATION
OPERATIONS OF QUEUE INSERT at Front or Rear end DELETE at Front or Rear end
FIRST OPERATIONS OF Q INSERT OPERATION :-  first of all, we  assume  three elements A,B,C….. And  added at Front and Rear end. B C Front Rear A
Now, we inserting a new element in this function this is called a insert function at Front and Rear end. A B C Front Rear D
SECOND OPERATION OF Q   DELETE OPERATION:-  In this function, we deleting a new element which was added in insert function at Front end. Now, see in figure –  D A B C Front Rear
GRAPHS IN DATA  STRUCTURE GUIDED BY-HARISH SIR PRESENTED BY-PUJA SONI
GRAPHS IE….. SPREAD YOUR TENTACLES
I N COMPUTER SCIENCE,GRAPH IS USE TO CREATE  ROAD STRUCTURE MAPS AEROPLANE MAPS ETC...
N ETWORKING! BE IT ANY WALK OF LIFE THAT’S THE KEY WORD TODAY BETTER YOUR NETWORK,FARTHER YOU WOULD REACH AND FUTHER YOU REPLACE YOUR TENTACLES BETTER WOULD YOU NETWORK, AND THE CRUX OF BUILDING AND MANAGING A NETWORK IS HIDDEN IN A SUBJECT AS INNOCUOUS AS DATA STRUCTURE IN A TOPIC CALLED GRAPHS
TERMINOLOGY THE NATURAL WAY TO UNDERSTAND  A  GRAPH IS TO REPRESENT VERTICES AS POINT OR CIRCLES AND EDGES AS LINE SEGEMENT OR ARCS CONNECTING THE VERTICES
GRAPHS THIS CONCEPT INTRODUCE IMPORTANT MATHAMATICAL STRUCTURE CALLED GRAPHS APPLICATION IN SUBJECT AS DIVERSE AS SOCIOLOGY,CHEMISTRY GEOGRAPHY AND ELECTRICALLY ENGINEERING
APPLICATION OF GRAPHS NOW A DAYS MANY APPLICATION RELATED WITH COMPUTATION RELATED WITH COMPUTATION CAN BE MANAGED EFFICIENTLY WITH GRAPH DATA STRUCTURE computer network Vertices in the graph might represent computer instollation, edges represent connection between computers.where we want to allow message from any computer to get any other possibility with routing through intermidiate computer with minimum cost of connection air lines routes vertices in a graph are cities and edges are root between cities we want to service a connected set of cities with minimum cost
TYPES OF GRAPHS DIRECTED GRAPH UNDIRECTED GRAPH IN THIS TYPE OF GRAPH PATH IS SPECIFIED THAT TYPE OF GRAPH IS CALLED  DIRECTED GRAPH IN THIS TYPE OF GRAPH PATH IS NOT SPECIFIED IN THIS TYPE OF GRAPH THIS TYPE OF GRAPH IS CALLED  UNDIRECTED GRAPH
selected south pacific air route this is also a graph THERE ARE MANY KINDS OF GRAPH
THE VARIOUS KIND OF UNDIRECTED GRAPH CONNECTED PATH THERE ARE SEVERAL UNDIRECTED GRAPH.TWO VERTICES IN AN UNDIRECTED GRAPH IS CALLED ADJACENT IF THERE IS AN EDGE OFROM FRIST TO THE SECOND ADJACENT
DIRECTED GRAPH THIS IS DIRECTED GRAPH  BECAUSE PATH IS SPECIFIED IN THIS GRAPH
CONNECTED DISCONNECTED PATH CYCLE TREE THESE ARE  THE VARIOUS KIND OF UNDIRECTED GRAPH
THANK YOU
Presented by Shivani & Palvinder
Link list as data structure
LINK LIST Definition:  In computer science linked list is a data structure that consist of a sequence of data record such that in each record there is a field that contains a reference of next record in a sequence
Link list are special list of some data element link to one another. each element in link list called a node. Each node in a link list must contain at least two fields. An information field and next address field. The information field contain the actual element on the list which may be a integer, character, string or a large records.
A linked list consists of several nodes. Each node consists of a data part and a link part.   Node Data Link
Use of Linked List Linked list as a data structure was used to solve many computer problem with a  language called IPL. The major use of linked list to develop 1- Artificial intelligence 2- Chess Program 3- General Problem Solver
Advantage of link list Link list are dynamic data structure. Efficient memory utilization that is memory is not pre allocated memory allocated . When ever it is required and is de allocated when it is no longer required. Insertion and deletion are easier and efficient Many complex application can easily handle with link list.
Disadvantage of link list 1.many complex required because each node contain more fields. 2.access to a particular node is little bit cumber some and time consuming.
Building a linked list Node Data Link 70 NULL 100 80 NULL 200 90 NULL 300 300 200
10 20 30 100 200 300 NULL This is linked list of 3 nodes Allocate memory for a new node 700 Set 99 value in data part of new node 99 Set link part of a new node ,with the address of first node  Adding a new node at the beginning
DELETION OF A NODE IN A LINK LIST 45 56 80 75 200 300 400 500 Initially link contain four nodes. Set links to the node. Delete third node from the list null Set value to the nodes FREE THE MEMORY OCCUPIED BY THIRD NODE
Types of link list Basically four types of link list : 1 singly link list. 2 doubly link list. 3 circular link list. 4 doubly and circular link list.
Singly link list A singly link list is one in which all nodes are linked together in same sequential manner . It is also called linear link list . It has the beginning and the end. The main with this list is that we cant access the previous node from the current node. This problem can be over come with link list . In this list each node divided in to two parts that is INFO AND NEXT.
SINGLY LINK LIST START A . . X INFO PART ADDRESS PART B C
Doubly link list A doubly link list is one in which all nodes are linked together by multiple link which is used in accessing next node and previous node from the curve node in the list .Each node in a doubly link list field to the left node and the right node .This help to traversed  the list in the forward direction  and the backward direction .So doubly link list provide bi directional traversing .each node in a doubly list is divided in three parts. INFO: To contain the information . NEXT: To contain the pointer to the next node. BACK :To contain the pointer to the previous node.
DOUBLY LINK LIST BACK INFO NEXT
START . A . . B . . C X
Circular link list A circular link list is one which having no of  beginning and no of end . A singly link list in which the link field of the last node contain the address of the first node of the list .That  is the last field of the last node does not contain the null pointer rather it point back to the beginning of the link list.
CIRCULAR LINK LIST START A B C . . .
DOUBLY CIRCULAR LINK LIST  A doubly circular link list is one which has both the successor pointer and procedure pointer in circular manner .A dell is a variation of doubly link list
DOUBLY CIRCULAR LINK LIST START . A . . . . C . B

DATA STRUCTURES

  • 1.
    DREAM VALLEY COLLEGE FOR GIRLS CENTRE FOR EDUCATIONAL EXECELLENCE ADD:-Near Railway spring factory, Sitholi , Gwalior (MP) AFFILATED TO:- JIWAJI UNIVERSITY (strictly according to jiwaji university)
  • 2.
    PPT PRESENTATION On DATA STRUCTURE BCA 2nd semester PRESENTED BY GUIDED BY HARISH SIR
  • 3.
    INDEX ARRAY LINKEDLIST QUEUES TREES GRAPHS SEARCH IT OUT STACK ARRAY STACK LINKEDLIST QUEUES TREES GRAPHS -
  • 4.
    Array is vitalpart of programming. It allows user to stored multiple value in single variable. Array stored in contiguous form in memory. INTRODUCTION TO ARRAY
  • 5.
    A B CF E D Array representation on memory OR INSERTION OF ELEMENT IN THE ARRAY
  • 6.
    operation performred onarray Traversal:- processing each element in the array . Search:- finding a location of an element in the given value. Insertion:- adding new element in array. deletion:- removing an element in array. Sorting:- arranging element in array. Merging:- combining two array in single array. Reversing:- reversing the element of array.
  • 7.
    A B CD E F DELETION OF ELEMENT IN THE ARRAY Delete (F) from the array. Delete (E) from the array. Delete (D) from the array. Delete (C) from the array. Delete (B) from the array. Delete (A) from the array.
  • 8.
    TREES IN DATASTRUCTURE DREAM VALLEY GROUP OF COLLEGE ADD-NEAR RAILWAY SPRING FACTORY QUARTERS PHONE-2469990
  • 9.
    TREES IN DATASTRUCTURE PRESENTED BY- GUIDED BY- HARISH SIR PUJA AND SHAIFALI
  • 10.
    TOPIC COVERED WHATIS TREE ROLE OF TREE IN DATA STRUCTURE BUILDING A SIMPLE TREE TYPES OF TREES BUILDING A BINARY TREE INORDER PRE ORDER POST ORDER ARRAY LINKED LIST
  • 11.
    WHAT IS TREETREES BRANCHES LEAVES ETC
  • 12.
    NATURE IS AMAN'S BEST TEACHER IF YOU UNDRESTAND THE CONCEPT OF TREE IT MEANS SIMPLE TREE --> CHILD NODE <- ROOT NODE/PARENT NODE
  • 13.
    BUT IN DATASTRUCTURETREE IS CREATED LIKE THIS BUT IN REVERSE FORM --> TREES IN REVERSE FORM -> child node <- root node
  • 14.
    IN A TREESTRUCTURE,HOWEVER EACH NODE MAY POINT TO SEVERAL NODE.
  • 15.
    Binary tree->binary treeis defined as finite set of node in which number of the children of a node should not exceed more than two .it means the degree of binary tree not then greater then two .
  • 16.
    BINARY TREE AB C D E F G THIS IS A BINARY TREE ROOT NODE CHILD NODE BRANCHES
  • 17.
    TYPES OF BINARYTREE STRICTLY BINARY TREE COMPLETE BINARY TREE EXTENDED BINARY TREE
  • 18.
    In every nonterminal node in a binary tree consists of non empty left subtree and right subtree ,then such a tree is called strictly binary tree . STRICTLY BINARY TREE
  • 19.
    STRICTLY BINARY TREEA B D E C F G NON TERMINAL NON TERMINAL
  • 20.
    Complete binary treeThe level of all nodes of complete binary tree is equal .
  • 21.
    A B CD E F G complete binary tree 0 1 2 THESE ARE LEVEL OF COMPLETE BINARY TREE AND THE LEVEL OF THIS COMPLTE BINARY TREE IS 2
  • 22.
    building a binarytree element are to be added 20 7 26 8 18 6 28 20 20 is a root node of this tree > 7 7 is compared with 20 7 > 26 26 is compared with 20 26 7 AND 26 IS CHILD NODE OF THE ROOT TREE > 8 8 IS COMPARED TO 26 THEN COMPARED TO 7 > 8 8 > 6 6 IS COMPARED WITH 20 AND 7 > 6 6 < 18 < 18 18 18 IS COMPARED WITH 20 AND 26 > 28 > 28 28 IS COMPARED WITH 20 AND 26 28 THIS IS THE BUILDING OF BINARY TREE THEN.. TRAVERSAL OF A BINARY TREE
  • 23.
    printing the datain in-order trversal To traverse a non empty binary tree in in-order following three operations are performed Traverse the left sub –tree in in-order Visit the root node Traverse the right sub-tree in in-order A B C D E F G TRVERSE STARTS FROM THE ROOT NODE Since D is the leaf node ,it gets printed ,which is the left child of D. D Now B gets printed as it is the parent of the node D B Since E is the leaf node ,it gets printed ,which is right child of B E Now A gets printed as it is the parent of the node B A Since F is the leaf node ,it gets printed ,which is the left child of c F Now C gets printed as it is the parent of the node F C Since G is leaf node ,it gets printed ,which the right child of C G In order traversal
  • 24.
    Post -order traversalPrinting the data in post-order traversal To traverse a non empty binary tree in in-order following three operations are performed Traverse the left sub –tree in in-order Visit the root node Traverse the right sub-tree in in-order A B C D E F G Now A gets printed as it is the parent of the node B Now C gets printed as it is the parent of the node F Since D is the leaf node ,it gets printed ,which is the left child of D. TRVERSE STARTS FROM THE ROOT NODE Now B gets printed as it is the parent of the node D D E B Now F gets printed as it is the left child of C F G C A Since E is the leaf node ,it gets printed ,which is right child of B Now G gets printed ,as it is the right child of C
  • 25.
    a non emptybinary tree in pre-order following three operations are performed To traverse Visit the root node Traverse the left sub –tree in pre-order Traverse the right sub-tree in pre-order Pre-order traversal A B C D E F G Printing the data in pre-order traversal Traversal starts from the root node The data at the root node i.e. A gets printed A Since D is the leaf node ,it gets printed ,which is the left child of B. D Now B gets printed as it is the parent of the node D B Since E is the leaf node ,it gets printed , which is right child of B E Now C gets printed as it is the parent of the node F C Since F is the leaf node ,it gets printed , which is the left child of c F Since G is leaf node ,it gets printed , which the right child of C G
  • 26.
    Representation of abinary trees in memory ->there are two ways by which we can represent a binary tree LINKED LIST ARRAY ARRAY LINKED LIST
  • 27.
    BINARY TREE CANBE REPRESENTED BY LINKS WHERE EACH NODE CONTAINS THE ADDRESS OF THE LEFT CHILD AND THE RIGHT CHILD
  • 28.
    LINKED LIST REPRESENTATIONLEFT DATA RIGHT NODE
  • 29.
    LINKED LIST REPRESENTATIONA B C D E H F G THE NODE D,E,F,G AND H CONTAIN A NULL VALUE IN BOTH THEIR LINK FIELD AS THESE ARE THE LEAF
  • 30.
    ARRAY REPRESENTATION OF BINARY TREE WHEN A BINARY TREE IS REPRESENTATED BY ARRAY THREE SEPRATE ARRAY IS REQUIRED ONE ARRAY ARR STORE DATA FEIDS OF THE TREE THE OTHER TWO ARRAY ARE LC AND RC I.E...... LEFT AND RIGHTCHILD
  • 31.
    ARRAY REPRESENTATION ARA B C D E F LC 1 2 3 4 5 6 RC 2 6 8 4 9 7 ARRAY
  • 32.
    PPT PRESENTATION ONSTACKDATA STRUCTURE BCA 2nd semester Dept. of computer science Presented by:- Guided by:- RICHA MITTAL HARISH SIR RANI KUSHWAH
  • 33.
  • 34.
    Topic Covered Introduction. Working of stack Push operation performed on stack Pop operation performed on stack Infix to prefix Infix to postfix Prefix to postfix Postfix to infix
  • 35.
    A Stack isa linear collection of data in which new item may be inserted and deleted at one end. It sometimes called LIFO and push down list . A stack is usually represented by computer by block of memory cells. Thus, stack data structure implemented (LIFO) property. The situation of LIFO may be compared as the plates of cafeteria where every new plate will added at the top. INTRODUCTION TO STACK
  • 36.
    Working of stackStacks associated with two basic operation i.e PUSH and POP. Push function means addition of element to the stack. Pop function means remove an element from the top op the stack.
  • 37.
    23 41 2536 12 Push Operation on stack ( PUSH ) INSERT 41 TO STACK ( PUSH ) INSERT 23 TO STACK ( PUSH ) INSERT 25 TO STACK ( PUSH ) INSERT 36 TO STACK ( PUSH ) INSERT 12 TO STACK STACK
  • 38.
    23 41 2536 12 POP OPERATION ON STACK ( POP ) DELETE 12 FROM THE STACK ( POP ) DELETE 36 FROM THE STACK ( POP ) DELETE 25 FROM THE STACK ( POP ) DELETE 23 FROM THE STACK ( POP ) DELETE 41 FROM THE STACK STACK
  • 39.
    EXPRESSION :- A + B * C C * B + A scan CONVERSION OF INFIX TO PREFIX NOTATION STACK INFIX PREFIX Character (C) scanned Operator(*) scanned Push (*) into the stack Character (B) scanned Priority of(*)is higher than (+),so(*) operator is poped from the stack Character(A) Scanned Pop(+) from the stack
  • 40.
    CONVERSION OF INFIXTO POSTFIX NOTATION EXPRESSION :- A + B * C STACK A + B * C INFIX SCAN POSTFIX Character(A) scanned Operator(+) scanned Character (B) scanned Operator (*) scanned Character (c) Scanned Priority of (*) is high, pop(*) from the stack pop (+) from the stack
  • 41.
    CONVERSION OF PREFIXTO POSTFIX NOTATION EXPRESSION :- + A * B C C B * A + scan PREFIX POSTFIX STACK OPERATOR (+)SCANNED CHARACTER (A) SCANNED OPERATOR (*)SCANNED CHARACTER(B) SCANNED CHARACTER (C)SCANNED Priority of (*) is higher than (+) ,pop (*) from the stack Pop (+) from the stack
  • 42.
    CONVERSION OF POSTFIXTO INFIX NOTATION EXPRESSION :- A B + C * SCAN A B + C * Operator(*) scanned, push to the stack Character (C) scanned Operator(+) scanned Priority of (*) is higher than (+),so (*) is pop from the stack Push (+) to the stack Scanned character (B) Pop (+) from the stack Character (A) scanned POSTFIX STACK INFIX
  • 43.
  • 44.
  • 45.
  • 46.
    CONCEPTLINEAR DATA STRUCTURE PRINCIPLE :- First in First out DEFINATION :- Ordered collection of items in a linear way.
  • 47.
    QUEUE AS ASINGLE LINE
  • 48.
    QUEUE ON GAME STATION
  • 49.
    OPERATIONS OF QUEUEINSERT at Front or Rear end DELETE at Front or Rear end
  • 50.
    FIRST OPERATIONS OFQ INSERT OPERATION :- first of all, we assume three elements A,B,C….. And added at Front and Rear end. B C Front Rear A
  • 51.
    Now, we insertinga new element in this function this is called a insert function at Front and Rear end. A B C Front Rear D
  • 52.
    SECOND OPERATION OFQ DELETE OPERATION:- In this function, we deleting a new element which was added in insert function at Front end. Now, see in figure – D A B C Front Rear
  • 53.
    GRAPHS IN DATA STRUCTURE GUIDED BY-HARISH SIR PRESENTED BY-PUJA SONI
  • 54.
    GRAPHS IE….. SPREADYOUR TENTACLES
  • 55.
    I N COMPUTERSCIENCE,GRAPH IS USE TO CREATE ROAD STRUCTURE MAPS AEROPLANE MAPS ETC...
  • 56.
    N ETWORKING! BEIT ANY WALK OF LIFE THAT’S THE KEY WORD TODAY BETTER YOUR NETWORK,FARTHER YOU WOULD REACH AND FUTHER YOU REPLACE YOUR TENTACLES BETTER WOULD YOU NETWORK, AND THE CRUX OF BUILDING AND MANAGING A NETWORK IS HIDDEN IN A SUBJECT AS INNOCUOUS AS DATA STRUCTURE IN A TOPIC CALLED GRAPHS
  • 57.
    TERMINOLOGY THE NATURALWAY TO UNDERSTAND A GRAPH IS TO REPRESENT VERTICES AS POINT OR CIRCLES AND EDGES AS LINE SEGEMENT OR ARCS CONNECTING THE VERTICES
  • 58.
    GRAPHS THIS CONCEPTINTRODUCE IMPORTANT MATHAMATICAL STRUCTURE CALLED GRAPHS APPLICATION IN SUBJECT AS DIVERSE AS SOCIOLOGY,CHEMISTRY GEOGRAPHY AND ELECTRICALLY ENGINEERING
  • 59.
    APPLICATION OF GRAPHSNOW A DAYS MANY APPLICATION RELATED WITH COMPUTATION RELATED WITH COMPUTATION CAN BE MANAGED EFFICIENTLY WITH GRAPH DATA STRUCTURE computer network Vertices in the graph might represent computer instollation, edges represent connection between computers.where we want to allow message from any computer to get any other possibility with routing through intermidiate computer with minimum cost of connection air lines routes vertices in a graph are cities and edges are root between cities we want to service a connected set of cities with minimum cost
  • 60.
    TYPES OF GRAPHSDIRECTED GRAPH UNDIRECTED GRAPH IN THIS TYPE OF GRAPH PATH IS SPECIFIED THAT TYPE OF GRAPH IS CALLED DIRECTED GRAPH IN THIS TYPE OF GRAPH PATH IS NOT SPECIFIED IN THIS TYPE OF GRAPH THIS TYPE OF GRAPH IS CALLED UNDIRECTED GRAPH
  • 61.
    selected south pacificair route this is also a graph THERE ARE MANY KINDS OF GRAPH
  • 62.
    THE VARIOUS KINDOF UNDIRECTED GRAPH CONNECTED PATH THERE ARE SEVERAL UNDIRECTED GRAPH.TWO VERTICES IN AN UNDIRECTED GRAPH IS CALLED ADJACENT IF THERE IS AN EDGE OFROM FRIST TO THE SECOND ADJACENT
  • 63.
    DIRECTED GRAPH THISIS DIRECTED GRAPH BECAUSE PATH IS SPECIFIED IN THIS GRAPH
  • 64.
    CONNECTED DISCONNECTED PATHCYCLE TREE THESE ARE THE VARIOUS KIND OF UNDIRECTED GRAPH
  • 65.
  • 66.
  • 67.
    Link list asdata structure
  • 68.
    LINK LIST Definition: In computer science linked list is a data structure that consist of a sequence of data record such that in each record there is a field that contains a reference of next record in a sequence
  • 69.
    Link list arespecial list of some data element link to one another. each element in link list called a node. Each node in a link list must contain at least two fields. An information field and next address field. The information field contain the actual element on the list which may be a integer, character, string or a large records.
  • 70.
    A linked listconsists of several nodes. Each node consists of a data part and a link part. Node Data Link
  • 71.
    Use of LinkedList Linked list as a data structure was used to solve many computer problem with a language called IPL. The major use of linked list to develop 1- Artificial intelligence 2- Chess Program 3- General Problem Solver
  • 72.
    Advantage of linklist Link list are dynamic data structure. Efficient memory utilization that is memory is not pre allocated memory allocated . When ever it is required and is de allocated when it is no longer required. Insertion and deletion are easier and efficient Many complex application can easily handle with link list.
  • 73.
    Disadvantage of linklist 1.many complex required because each node contain more fields. 2.access to a particular node is little bit cumber some and time consuming.
  • 74.
    Building a linkedlist Node Data Link 70 NULL 100 80 NULL 200 90 NULL 300 300 200
  • 75.
    10 20 30100 200 300 NULL This is linked list of 3 nodes Allocate memory for a new node 700 Set 99 value in data part of new node 99 Set link part of a new node ,with the address of first node Adding a new node at the beginning
  • 76.
    DELETION OF ANODE IN A LINK LIST 45 56 80 75 200 300 400 500 Initially link contain four nodes. Set links to the node. Delete third node from the list null Set value to the nodes FREE THE MEMORY OCCUPIED BY THIRD NODE
  • 77.
    Types of linklist Basically four types of link list : 1 singly link list. 2 doubly link list. 3 circular link list. 4 doubly and circular link list.
  • 78.
    Singly link listA singly link list is one in which all nodes are linked together in same sequential manner . It is also called linear link list . It has the beginning and the end. The main with this list is that we cant access the previous node from the current node. This problem can be over come with link list . In this list each node divided in to two parts that is INFO AND NEXT.
  • 79.
    SINGLY LINK LISTSTART A . . X INFO PART ADDRESS PART B C
  • 80.
    Doubly link listA doubly link list is one in which all nodes are linked together by multiple link which is used in accessing next node and previous node from the curve node in the list .Each node in a doubly link list field to the left node and the right node .This help to traversed the list in the forward direction and the backward direction .So doubly link list provide bi directional traversing .each node in a doubly list is divided in three parts. INFO: To contain the information . NEXT: To contain the pointer to the next node. BACK :To contain the pointer to the previous node.
  • 81.
    DOUBLY LINK LISTBACK INFO NEXT
  • 82.
    START . A. . B . . C X
  • 83.
    Circular link listA circular link list is one which having no of beginning and no of end . A singly link list in which the link field of the last node contain the address of the first node of the list .That is the last field of the last node does not contain the null pointer rather it point back to the beginning of the link list.
  • 84.
    CIRCULAR LINK LISTSTART A B C . . .
  • 85.
    DOUBLY CIRCULAR LINKLIST A doubly circular link list is one which has both the successor pointer and procedure pointer in circular manner .A dell is a variation of doubly link list
  • 86.
    DOUBLY CIRCULAR LINKLIST START . A . . . . C . B