Tribhuvan University
Institute of Science and Technology
Bachelor of Science in Computer Science and Information Technology
| Course Title: Data Structure and Algorithm | Full Marks: 60 + 20 + 20 |
| Course no: CSC211 | Pass Marks: 24 + 8 + 8 |
| Semester: III | Credit Hours: 3 |
| Nature of course: Theory + Lab | |
Course Description: This course includes the basic foundations of data structures and algorithms. This course covers concepts of various data structures like stack, queue, list, tree and graph. Additionally, the course includes idea of sorting and searching.
Course Objective:
- To introduce data abstraction and data representation in memory
- To describe, design and use of elementary data structures such as stack, queue, linked list, tree and graph
- To discuss decomposition of complex programming problems into manageable sub-problems
- To introduce algorithms and their complexity
Course Contents
Unit 1. Introduction (4 Hrs.)
- Data types, Data structure and Abstract data type
- Dynamic memory allocation in C
- Introduction to Algorithms
- Asymptotic notations and common functions
Unit 2. Stack (4 Hrs.)
- Basic Concept of Stack, Stack as an ADT, Stack Operations, Stack Applications
- Conversion from infix to postfix/prefix expression, Evaluation of postfix/prefix expressions
Unit 3. Queue (4 Hrs.)
- Basic Concept of Queue, Queue as an ADT, Primitive Operations in Queue
- Linear Queue, Circular Queue, Priority Queue, Queue Applications
Unit 4. Recursion (4 Hrs.)
- Principle of Recursion, Comparison between Recursion and Iteration, Tail Recursion
- Factorial, Fibonacci Sequence, GCD, Tower of Hanoi (TOH)
- Applications and Efficiency of Recursion
Unit 5. Lists (8 Hrs.)
- Basic Concept, List and ADT, Array Implementation of Lists, Linked List
- Types of Linked List: Singly Linked List, Doubly Linked List, Circular Linked List
- Basic operations in Linked List: Node Creation, Node Insertion and Deletion from Beginning, End and Specified Position
- Stack and Queue as Linked List
Unit 6. Sorting (8 Hrs.)
- Introduction and Types of sorting: Internal and External sort
- Comparison Sorting Algorithms: Bubble, Selection and Insertion Sort, Shell Sort
- Divide and Conquer Sorting: Merge, Quick and Heap Sort
- Efficiency of Sorting Algorithms
Unit 7. Searching and Hashing (7 Hrs.)
- Introduction to Searching, Search Algorithms: Sequential Search, Binary Search
- Efficiency of Search Algorithms
- Hashing: Hash Function and Hash Tables, Collision Resolution Techniques
Unit 8. Trees and Graphs (8 Hrs.)
- Concept and Definitions, Basic Operations in Binary Tree, Tree Height, Level and Depth
- Binary Search Tree, Insertion, Deletion, Traversals, Search in BST
- AVL tree and Balancing algorithm, Applications of Trees
- Definition and Representation of Graphs, Graph Traversal, Minimum Spanning Trees: Kruskal and Prim’s Algorithm
- Shortest Path Algorithms: Dijkstra’s Algorithm
Laboratory Works
The laboratory work consists of implementing the algorithms and data structures studied in the course. Students should implement at least following concepts:
- Dynamic memory allocation and deallocation strategies
- Stack operations and Queue operations
- Array and Linked List implementation of List
- Linked List implementation of Stack and Queues
- Sorting, Searching and Hashing algorithms
- Binary Search Trees and AVL Trees
- Graph Representation, Spanning Tree and Shortest Path Algorithms
Text Books
- Y Langsam, MJ Augenstein and A.M, Tanenbaum, Data Structures using C and C++, Prentice Hall India, Second Edition 2015
Reference Books
- Leen Ammeral, Programmes and Data Structures in C, Wiley Professional Computing
- G.W Rowe, Introduction to Data Structure and Algorithms with C and C++, Prentice Hall India
- R.L Kruse, B.P. Leung, C.L. Tondo, Data Structure and Program Design in C, Prentice-Hall India