1 / 14

Data Structure

Data Structure. An Overview Approach. Data Type v/s Data Structure. Data Type= Permitted data value (domain) +operations Data Structure= Organized data type +Allowed operations. Data structure at a glance. Major Operations. Insertion Deletions Traversal Searching

fern
Télécharger la présentation

Data Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structure An Overview Approach

  2. Data Type v/s Data Structure • Data Type= Permitted data value (domain) +operations • Data Structure= Organized data type +Allowed operations

  3. Data structure at a glance

  4. Major Operations • Insertion • Deletions • Traversal • Searching • Sorting

  5. Traversal in Tree/Graph Data Structure • In order • Pre order • Post order • Reverse In order • Reverse Pre order • Reverse Post order • Level by level Tree Graph • DFS • BFS

  6. Sorting Methods on various Data structure

  7. Application Area of various Data Structure • Stack- Infix/Prefix Expression Conversion and Evaluation, Reversing an Array/ Memory Mgt. • Queue- Priority Queue/Banking/ Reservation/ Buffer Mgt/ Process Mgt • Tree- Game Tree/ Decision Tree/ Histogram /Chain Membership Mgt./ Symbol Table • Graph- Networking/ Operation Research/ Project Planning & Mgt./Finding Shortest path

  8. Linked Stack • Push Operation Function lpush(top,x) 1. new <=node 2. info(new)=x 3. link(new)=top 4. top=new 5. return (top) End function

  9. Linked Stack • Pop Operation Function lpop(top) 1. item=0 2. if top=NULL print(‘Empty stack’) else item=info(top) top=link(top) 3. return (item) End function

  10. Linked Queue • Insertion Operation // front & rear are global pointer declared as node type// Function ladd(item) 1. new<=NODE // allocate new node 2. info(new)=item 3. link(new)=NULL 4. if front=NULL // is queue empty?// front=Rear=new Else link(rear)=new rear=new // attach node // End function

  11. Linked Stack • Delete Operation Function ldel( ) 1. item=0 2. if front=NULL print(‘Empty Queue’) else item=info(front) front = link(front) 3. return (item) End function

  12. Circular Queue -Array • Insert Operation Function CQInsert(CQ,Item ) 1. t=(rear+1)%MAX 2. if t=front print(‘ Queue full’) else CQ[t]=item rear=t End function

  13. Circular Queue -Array • Delete Operation Function CQDel(CQ) 1. item=0 2. if front=rear print(‘ Queue Empty’) else front=(front+1)%MAX item=CQ[front] 3. return(item) End function

  14. Thanks Presented by - Mr. Rajesh Kumar Mishra PGT (Computer Science) KV No. 1 AFS, Suratgarh

More Related