Data Structure & Algorithm
BCA203CO
Year: II Semester: I
Teaching Schedule Hours/Week Examination Scheme
Theory Tutorial Practical Internal Assessment Final Total
3 1 2 Theory Practical Theory Practical 100
20 20 60 -
Course Objective
The main objective of this course is to provide fundamental knowledge of data structure,
various algorithms used and their implementations.
Course contents
1. Introduction [2 Hrs]
1.1 Introduction to Data and Data Types
1.2 Data Structure (DS), Abstract Data Type (ADT) and Applications
1.3 Abstract Data Type vs. Data Structure
2. Algorithm Efficiency and Complexity [2 Hrs]
2.1 Time and Space Analysis
2.2 Asymptotic Notations: big O, sigma, theta, omega
3. Stack [5 Hrs]
3.1 Definition and Examples of Stack
3.2 Stack as an Abstract Data Type
3.3 Array Representation/ Implementation of Stack
3.4 Primitive Stack Operations and Algorithm Efficiency
3.5 Stack Overflow and Stack Underflow Conditions
3.6 Application of Stack: Prefix, Infix and Postfix Expression:
3.6.1 Definition.
3.6.2 Evaluation of Infix, Prefix and Postfix Expression using Stack.
3.6.3 Converting an Expression from Infix to Postfix and Vice-Versa.
1
4. Queue [4 Hrs]
4.1 Definition and Examples of Queue
4.2 Queue as an Abstract Data Type
4.3 Array Representation/ Implementation of Queue
4.4 Primitive Queue Operations and Algorithm Efficiency
4.5 Queue Overflow and Stack Underflow Conditions
4.6 Linear and Circular Queue
4.7 Priority Queue
5. List and Linked List [6 Hrs]
5.1 Introduction to List as an Abstract Data Type
5.2 Primary List Operations
5.3 Static and Dynamic List Structure
5.4 Linked List as an Abstract Data Type
5.5 Types of Linked List
5.5.1 Linear linked List – Singly and Doubly Linear Linked Lists
5.5.2 Circular linked list – Singly and Doubly Circular Linked Lists
5.6 Advantages of Doubly Linked over Singly Linked List
5.7 Basic Linked List operations: Insertion/Deletion of a Node as: Front Node, Last
Node, Before a Given Node, & After a Given Node.
5.8 Dummy Node
5.9 Linked List implementation of Stack and Queue
6. Recursion [3 Hrs]
6.1 Principle of Recursion
6.2 Recursion Vs. Iteration with Advantages and Disadvantages
6.3 Applications of Recursion: Fibonacci Sequence, TOH and Multiplication of
Natural Numbers; with Algorithm Efficiency
7. Trees [6 Hrs]
7.1 Concepts and Definitions of Tree
7.2 Properties of Tree
7.3 Binary Tree: Definition, Applications, Representation using Linked List
7.4 Binary Search Tree (BST)
7.5 Insertion, Deletion in Binary Search Tree
2
7.6 Binary Tree Traversals – Pre-order, In-order and Post-order Traversal.
7.7 Height, Depth and Level of a Tree
7.8 AVL Tree and Balancing Algorithm
7.9 Huffman Algorithm
8. Sorting [6 Hrs]
8.1 Definition and types of Sorting: Internal and External sort
8.2 Sorting Algorithms: Insertion Sort, Selection sort, Bubble sort
8.3 Sorting using Divide & Conquer: Quick Sort, Merge Sort
8.4 Radix Sort, Shell sort
8.5 Heap Sort as a Priority Queue
8.6 Efficiency of Sorting Algorithms
9. Searching and hashing [4 Hrs]
9.1 Definition, Concept and Essentials of Searching, Keys
9.2 Types of Searching: Sequential Search, Binary Search, Binary Search Tree
9.3 General Search Tree
9.4 Hashing
9.4.1 Hash Functions and Hash Table
9.4.2 Collision Resolution technique
9.5 Efficiency of different Searching Methods
10. Graphs
10.1 Definition and Representation of Graphs
10.2 Application of Graphs
10.3 Graphs as an Abstract Data Type
10.4 Adjacency Matrix Representation, Transitive Closure
10.5 Warshall’s Algorithm
10.6 Types of Graphs
10.7 Graph Traversal: Depth First Search (DFS), Breadth First Search (BFS)
10.8 Spanning Tree and Spanning Forest
10.9 Minimum Spanning Tree & Greedy Approach: Kruskal’s Algorithm, Prim’s
Algorithm, Round Robin Algorithm
10.10Finding Shortest Path: Dijkstra’s Algorithm
3
Laboratory
There shall be following Lab Exercises:
Implementation of Stack
Implementation of Linear and Circular Queues
Solution of TOH and Fibonacci Sequence
Implementation of Linked List: Singly and Doubly Linear & Circular Linked List
Implementation of Tree: Binary Tree Traversals
Implementation of trees: AVL Trees
Implementation of Merge Sort
Implementation of Heap
Implementation of Search: Sequential, Binary
Implementation of Hashing
Implementation of Graph: Graph Traversals
Reference books
1. “Data Structure using C & C++”, Aarton M. Tenenbaum, Y. Langsam, M. J. Augenstein,
PHI.
2. “Fundamental of Computer Algorithms”, H. Sahani
3. “Data Structure of Program Design in C”, Robert L. Kruse, B. P. Leung, C. L. TOndo,
PHI
4. “The Art of Programming, Sorting & Searching”, Donald E. Knuti-I.
5. “Data Structure & Application”, Trebly & Sorenson
6. “Introduction to Data Structure & Algorithms with C & C++”, G. W. Rowe, PHI
7. “Fundamentals of Algorithms”, G. Brassand & P. Bratley, PHI