You are on page 1of 55

Chapter 1-Part II

Outlines
Before all (--Structure--)
Accessing Members of Structure Variables
Self-Referential Structures
Linked List
Array Vs. Linked list
Defining the data structure for a linked list
Operations on Linked lists
Adding an element at the beginning
Adding an element at the end

Displaying the list of nodes
Navigating through the list
Deleting a node
Deleting the first node in the linked list
Deleting the last node
Variations of Linked Lists
Exercise
Stack
Implementation of Stacks
Stack attributes and Operations
Create Stack
Push Stack
Pop Stack
Stack Top
Printing all the elements
Linked-List implementation of stack
puuuush
The POP Operation
Application of stack Data Structure
Expression evaluation
Algorithm for Infix to Postfix
Examples
Postfix Expressions
Queue
Enqueue and Dequeue
Array Implementation of Queue

Implementation using Circular Array
Checking queue size
Queue Class
Create Queue
IsEmpty & IsFull
Queue full implementation
Linked list implementation of Queue
Group assignment Assignment #1
End of Chapter 1

You might also like