Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
17Activity

Table Of Contents

Types of Linked List
2.1.2 Singly Linked List
DECLARATION FOR LINKED LIST
ROUTINE TO INSERT AN ELEMENT IN THE LIST
ROUTINE TO CHECK WHETHER THE LIST IS EMPTY
ROUTINE TO CHECK WHETHER THE CURRENT POSITION IS LAST
FIND ROUTINE
FIND PREVIOUS ROUTINE
FINDNEXT ROUTINE
ROUTINE TO DELETE AN ELEMENT FROM THE LIST
ROUTINE TO DELETE THE LIST
2.1.3 Doubly Linked List
STRUCTURE DECLARATION : -
ROUTINE TO INSERT AN ELEMENT IN A DOUBLY LINKED LIST
ROUTINE TO DELETE AN ELEMENT
Advantage
Disadvantage
2.1.4 Circular Linked List
Singly Linked Circular List
Doubly Linked Circular List
Advantages of Circular Linked List
2.1.5 Applications of Linked List
Polynomial ADT
DECLARATION FOR LINKED LIST IMPLEMENTATION OF POLYNOMIAL ADT
CREATION OF THE POLYNOMIAL
ADDITION OF TWO POLYNOMIALS
SUBTRACTION OF TWO POLYNOMIAL
POLYNOMIAL DIFFERENTIATION
Radix Sort : - (Or) Card Sort
PASS 1 :
Buckets
PASS 2 :
2.2 THE STACK ADT
2.2.1 Stack Model :
2.2.2 Operations On Stack
PUSH :
POP :
EXCEPTIONAL CONDITIONS
OverFlow
2.2.3 Implementation of Stack
Array Implementation
ROUTINE TO PUSH AN ELEMENT ONTO A STACK
ROUTINE TO POP AN ELEMENT FROM THE STACK
ROUTINE TO RETURN TOP ELEMENT OF THE STACK
LINKED LIST IMPLEMENTATION OF STACK
DECLARATION FOR LINKED LIST IMPLEMENTATION
ROUTINE TO CHECK WHETHER THE STACK IS EMPTY
ROUTINE TO CREATE AN EMPTY STACK
ROUTINE TO RETURN TOP ELEMENT IN A STACK
ROUTINE TO POP FROM A STACK
2.2.4 APPLICATIONS OF STACK
Different Types of Notations To Represent Arithmetic Expression
INFIX
POSTFIX
PREFIX
INFIX PREFIX (or) POLISH POSTFIX (or) REVERSE
POLISH
1. Evaluating Arithmetic Expression
Infix to Postfix Conversion
Evaluating Postfix Expression
Recursive Solution
RECURSIVE ROUTINE FOR TOWERS OF HANOI
Function Calls
RECURSIVE FUNCTION TO FIND FACTORIAL : -
2.3 The Queue ADT
2.3.1 Queue Model
2.3.2 Operations on Queue
Dequeue :
Exception Conditions
2.3.3 Implementation of Queue
ROUTINE TO ENQUEUE
ROUTINE FOR DEQUEUE
Linked List Implementation of Queue
Queue ADT
DECLARATION FOR LINKED LIST IMPLEMENTATION OF QUEUE ADT
ROUTINE TO CHECK WHETHER THE QUEUE IS EMPTY
ROUTINE TO CHECK AN EMPTY QUEUE
ROUTINE TO ENQUEUE AN ELEMENT IN QUEUE
ROUTINE TO DEQUEUE AN ELEMENT FROM THE QUEUE
2.3.4 Double Ended Queue (DEQUE)
2.3.5 Circular Queue
Advantages
ROUTINE TO INSERT AN ELEMENT IN CIRCULAR QUEUE
ROUTINE TO DELETE AN ELEMENT FROM CIRCULAR QUEUE
2.3.6 Priority Queues
2.3.7 Applications of Queue
Important Questions
Part - A
Part - B
TREES
3.1 PRELIMINARIES :
3.2 BINARY TREE
Definition :-
BINARY TREE NODE DECLARATIONS
COMPARISON BETWEEN
GENERAL TREE & BINARY TREE
General Tree Binary Tree
FULL BINARY TREE :-
COMPLETE BINARY TREE :
3.2.1REPRESENTATION OF A BINARY TREE
Linear Representation
Linked Representation
3.2.2 EXPRESSION TREE
Constructing an Expression Tree
3.3 The Search Tree ADT : - Binary Search Tree
Definition : -
Comparision Between Binary Tree & Binary Search Tree
Binary Tree Binary Search Tree
DECLARATION ROUTINE FOR BINARY SEARCH TREE
Make Empty :-
ROUTINE TO MAKE AN EMPTY TREE :-
Insert : -
ROUTINE TO INSERT INTO A BINARY SEARCH TREE
Find : -
ROUTINE FOR FIND OPERATION
Find Min :
RECURISVE ROUTINE FOR FINDMIN
NON - RECURSIVE ROUTINE FOR FINDMIN
RECURSIVE ROUTINE FOR FINDMAX
NON - RECURSIVE ROUTINE FOR FINDMAX
Delete :
CASE 1 Node with no children (Leaf node)
CASE 2 : - Node with one child
To Delete 5
Case 3 : Node with two children
DELETION ROUTINE FOR BINARY SEARCH TREES
BINARY HEAP
Structure Property
Heap Order Property
Declaration for priority queue
Initialization
BASIC HEAP OPERATIONS
Insert Operation
Routine To Insert Into A Binary Heap
DeleteMin
ROUTINE TO PERFORM DELETEMIN IN A BINARY HEAP
OTHER HEAP OPERATIONS
DECREASE KEY
Increase - Key
Hashing
Hash Table
Hashing Function
ROUTINE FOR SIMPLE HASH FUNCTION
Collisions
Collision Resolution
Seperate Chaining
Insertion
ROUTINE TO PERFORM INSERTION
Disadvantage of Seperate Chaining
OPEN ADDRESSING
LINEAR PROBING
Advantage :
GRAPH
BASIC TERMINOLOGIES
Directed Graph (or) Digraph
Undirected Graph
Weighted Graph
Complete Graph
Strongly Connected Graph
Length
Loop
Simple Path
Cycle
Degree
ACyclic Graph
Representation of Graph
Adjacency List Representation
5.3 Topological Sort
Routine to perform Topological Sort
Note :
Dijkstra's Algorithm
ROUTINE FOR ALGORITHM
Minimum Spanning Tree
Cost = 5
Spanning Tree with minimum cost is considered as Minimum Spanning Tree
5.5.1 Prim's Algorithm
SKETCH OF PRIM'S ALGORITHM
Depth First Search
To implement the Depthfirst Search perform the following Steps :
ROUTINE FOR DEPTH FIRST SEARCH
Example : -
Adjacency Matrix
Implementation
subgraph
[Example] Graph G in Figure 1:
[Example] The DFN(i) and L(i) of Graph G in Figure 1 are:
NP - Complete Problems
Hamilton Cycle Problem transformed to travelling salesman problem
EE 2204 Data Structure and Algorithms analysis
0 of .
Results for:
No results containing your search query
P. 1
1071

1071

Ratings: (0)|Views: 2,062 |Likes:
Published by Prashanth Raghavan

More info:

Published by: Prashanth Raghavan on Jul 30, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/27/2012

pdf

text

original

You're Reading a Free Preview
Pages 4 to 69 are not shown in this preview.
You're Reading a Free Preview
Pages 73 to 95 are not shown in this preview.
You're Reading a Free Preview
Pages 99 to 112 are not shown in this preview.
You're Reading a Free Preview
Pages 116 to 123 are not shown in this preview.

Activity (17)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Sangavi Yogamani liked this
Jaya Nivetha liked this
Rahul Sridhar liked this
Sai Pavan liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->