CS301 : Data Structures

Course Overview

Course Synopsis

Data Structures is a core course in a typical undergraduate Computer Science Curriculum. The topics covered in the course are among the most fundamental material in all of computer science. The course prepares the students for (and is a prerequisite for) the more advanced material students will encounter in later courses. The course will cover well-known data structures such as dynamic arrays, linked lists, stacks, queues, tree, heap, disjoint sets and table. Three goals will be accomplished: (1) Implement these structures in C++ (2) Determine which structures are appropriate in various situations (3) Confidently learn new structures beyond what''''s presented in this class

Course Learning Outcomes

At the end of the course, you should be able to:

  • Understand Abstract Data Types such as Lists, Queues etc.
  • Understand and program Stack operations (Push, Pop, isEmpty)
  • Understand and implement Queue Operations (Insert, Remove) using Linked Lists
  • Describe binary Trees
  • Know about height balanced trees and application of trees

Course Calendar

Introduction, Array data type, List Abstract Data Type (ADT)1Handouts3-11
List ADT operations, implementation of List ADT with arrays and linked list2Handouts12-19
C++ code for linked lists3Handouts20-31
C++ code for linked list, doubly linked list,  circularly linked list, Josephus problem4Handouts32-45
Stacks, stack operations, implementation with arrays5Handouts46-55
Stack implementation with linked list, prefix, infix and postfix expressions, infix to postfix conversion.6Handouts56-62
Uses of stacks: evaluating postfix expression, converting infix to postfix form7Handouts63-70
C++ templates, using templates in Stack class8Handouts71-81
Runtime memory organization, runtime stack layout, Queue ADT, implementing queue ADT using linked list and circular arrays.9Handouts82-92
Assignment No. 1
Uses of queue: simulation, event based simulation of a bank, priority queues10Handouts93-104
Priority queue implementation using arrays, Binary trees11Handouts105-122
Complete Binary tree, application of Binary trees: search for duplicates, Binary Search Tree (BST), implementation using C++.12Handouts123-134
Cost of search in BST, binary tree traversal: pre-order, in-order,  post-order13Handouts135-145
Recursive pre-order, in-order, post-order traversal, non-recursive traversal using explicit stack, level-order traversal14Handouts146-157
Level-order traversal using a queue, deleting node in BST15Handouts158-169
Assignment No. 2
C++ code for delete node in BST. The BST class16Handouts170-188
C++ Reference variables17Handouts189-202
C++ Reference variables, the C++ const keyword18Handouts202-210
Degenerate BST, height balanced BST - AVL trees.19Handouts211-219
Quiz No. 1
Inserting in a AVL tree.20Handouts220-230
Inserting in a balanced BST, tree rotation for height balancing21Handouts231-239
Various rotation cases, C++ code for insert with rotations22Handouts240-256
Mid Term Examination
C++ code for insert with single and double rotations23Handouts257-272
Deleting node in an AVL tree, other uses of trees: expression trees24Handouts273-283
Constructing expression trees using stacks, Huffman encoding for data compression25Handouts284-295
Building Huffman code tree, generating Huffman code26Handouts296-306
Threaded binary trees.27Handouts307-320
In-order traversal of threaded binary tree, complete binary tree stored in an array28Handouts321-332
The Heap ADT, implementation of heap ADT using complete binary tree, inserting into a heap.29Handouts333-347
Delete (min) in a heap. Build heap from a set of data items.30Handouts348-359
Build heap operation. Heap ADT as a C++ class31Handouts360-369
Assignment No. 3
Proof of Build heap being a linear time operation.32Handouts370-378
Priority queue implementation using heap ADT, selection problem, heap sort. Equivalence relations33Handouts379-385
Equivalence relations, Disjoint Sets34Handouts386-392
Disjoint sets implementation using inverted trees, the Union and Find operations on Disjoint Sets.35Handouts393-403
Optimizing Union and Find operation, Union by size, path compression36Handouts404-415
Uses of Disjoint Sets: Image segmentation, maze generation37Handouts416-423
The Table ADT, implementation using arrays38Handouts424-429
Table ADT implementations using sorted arrays, binary search algorithm on sorted arrays, skip lists39Handouts430-440
Skip lists insertion and deletion40Handouts441-448
Graded Discussion Board (GDB)
Table ADT implementation using Hashing41Handouts449-458
Collision resolution in Hashing42Handouts459-467
Other uses of Hashing, sorting43Handouts468-473
Quiz No. 2
Selection sort, insertion sort, bubble sort algorithms44Handouts474-484
Divide and conquer strategy: merge sort, quick sort.45Handouts485-504
Final Term Examination
Back to Top