Third Semester

Selction Image

Data Structure and Algorithm

Course Title: Data Structure and Algorithm

Course No.: CSC206

Course Nature: Theory + Lab

Semester: Third

Year: Second

Full Marks: 60 + 20 + 20

Pass Marks: 24 + 8 + 8

Credit Hours: 3

Course Description: This course includes the basic foundations in 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 Objectives: 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.

Contents of Chapter

Unit 1. Introduction to Data Structures Algorithm (4hrs)

1.1 Data types, Data structure and Abstract date type
1.2 Dynamic memory allocation in C
1.3 Introduction to Algorithms
1.4 Asymptotic notations and common functions

nit 2. Stacks (4 hrs.)

2.1 Basic Concept of Stack, Stack as an ADT, Stack Operations, Stack Applications
2.2 Conversion from infix to postfix/prefix expression, Evaluation of postfix/ prefix expression

Unit 3. Queue (4 hrs.)

3.1 Basic Concept of Queue, Queue as an ADT, Primitive Operations in Queue
3.2 Linear Queue, Circular Queue, Priority Queue, Queue Applications

Unit 4. Recursion (3 hrs.)

4.1 Principle of Recursion, Comparison between Recursion and Iteration, Tail Recursion
4.2 Factorial, Fibonacci Sequence, GCD, Tower of Hanoi(TOH)
4.3 Applications and Efficiency of Recursion

Unit 5. Lists (8 hrs.)

5.1 Basic Concept, List and ADT, Array Implementation of Lists, Linked List
5.2 Types of Linked List: Singly Linked List, Doubly Linked List, Circular Linked List.
5.3 Basic operations in Linked List: Node Creation, Node Insertion and Deletion from Beginning, End and Specified Position
5.4 Stack and Queue as Linked List

Unit 6. Sorting (8 hrs.)

6.1 Introduction and Types of sorting: Internal and External sort
6.2 Comparison Sorting Algorithms: Bubble, Selection and Insertion Sort, Shell Sort
6.3 Divide and Conquer Sorting: Merge, Quick and Heap Sort
6.4 Efficiency of Sorting Algorithms

Unit 7: Searching and Hashing (7 hrs.)

7.1 Introduction to Searching, Search Algorithms: Sequential Search, Binary Search
7.2 Efficiency of Search Algorithms
7.3 Hashing : Hash Function and Hash Tables, Collision Resolution Techniques

Unit 8: Trees and Graphs (8 hrs.)

8.1 Concept and Definitions, Basic Operations in Binary Tree, Tree Height, Level and Depth
8.2 Binary Search Tree, Insertion, Deletion, Traversals, Search in BST
8.3 AVL tree and Balancing algorithm, Applications of Trees
8.4 Definition and Representation of Graphs, Graph Traversal, Minimum Spanning Trees: Kruskal and Prims Algorithm
8.5 Shortest Path Algorithms: Dijksrtra Algorithm

Laboratory Works:

fter completing this course, students should have practical knowledge of data structures, algorithms, and ADTs.
The laboratory work includes:

  1. Writing programs with dynamic memory allocation and de-allocation.
  2. Writing programs to implement stack operations.
  3. Writing programs using stack to convert infix expression to postfix/prefix expression and to evaluate postfix/prefix expression.
  4. Writing programs to implement queue operations for linear, circular, and priority queue.
  5. Writing recursive programs to implement factorial, Fibonacci sequence, GCD, and Tower of Hanoi algorithms.
  6. Writing programs to implement list using array and linked list.
  7. Writing programs for linked list implementation of stack and queue.
  8. Writing programs to implement sorting, searching and hashing algorithms.
  9. Writing programs to implement Binary Search Trees and AVL Tress.
  10. Writing programs to implement searching, spanning tree and shortest path.

Text Books:

  1. Y Langsam , MJ Augenstein and A.M , Tanenbaum Data Structures using C and C++ , Prentice Hall India, Second Edition 2015

Reference Books:

  1. Leen Ammeral, Programmes and Data Structures in C, Wiley Professional Computing
  2. Rowe, Introduction to Data Structure and Algorithms with C and C++ , prentice Hall India
  3. R.L Kruse, B.P. Leung, C.L. Tondo, Data Structure and Program Design in C Prentice- Hall India