Birla Institute of Technology and Science, Pilani,
Hyderabad Campus
Department of Computer Sc. and Information Systems
First Semester 2023-2024
BITS F232 (Foundations of Data Structures and Algorithms)
Date: 11th Aug 2023
Course Number : BITS F232 (L:3, P:1, U:4) T, Th, S: 4th hour (F-105)
Course Title : Foundations of Data Structures and Algorithms
Instructor-In-Charge : Chittaranjan Hota (hota[AT]hyderabad.bits-
pilani.ac.in)
Instructors : Aneesh Sreevallabh Chivukula, Barsha Mitra
Scope and Objectives of the Course:
A data structure is a collection of large amounts of data values, the relationships
among them, and the functions or operations that can be applied on them. In order
to be effective, data has to be organized in a manner that adds to the effectiveness of
an algorithm, and data structures such as stacks, queues, linked lists, heaps, trees,
and graphs provide different capabilities to organize and manage large amounts of
data. While developing a program or an application, many developers find
themselves more interested in the type of algorithm used rather than the type of
data structure implemented. However, the choice of data structure used for a
particular algorithm is always of paramount importance. For example, B-trees have
unique abilities to organize indexes and hence are well suited for implementation
of databases; Linked lists are well suited for backtracking algorithms like, accessing
previous and next pages in a web browser; Tries are well suited for implementing
approximate matching algorithms like, spell checking software or predicting text in
dictionary lookups on Mobile phones; Graphs are well suited for path optimization
algorithms (like in Google maps) or searching in a Social graph (like Facebook). As
computers have become faster and faster, the problems they must solve have
become larger and more complex, requiring development of more complex
programs. This course will also teach students good programming and algorithm
analysis skills so that they can develop such programs with a greater degree of
efficiency.
The primary objectives of the course are as under:
Apply various basic data structures such as stacks, queues, linked lists, trees etc.
to solve complex programming problems. Understand basic techniques of
algorithm analysis.
Design and implement advanced data structures like graphs, balanced search
trees, hash tables, priority queues etc. Apply graph and string algorithms to solve
real world problems like finding shortest paths on huge maps or detecting
plagiarism percentage.
Apply basic algorithmic techniques such as brute-force, greedy algorithms, divide
and conquer, dynamic programming etc. to solve complex programming
problems and examine their efficiency.
At the end of the course, you should understand common data structures and
algorithms, be able to develop new data abstractions (interfaces) and use existing
library components in C++.
Reference Books:
R1: Data Structures and Algorithms in C++, Michael T. Goodrich, Roberto
Tamassia, David M. Mount, 2nd Edition, Wiley, 2015.
R2: Introduction to Algorithms, TH Cormen, CE Leiserson, RL Rivest, C Stein, 3rd Ed.,
MIT Press, PHI, 2010.
R3: Data Structures & Algorithm Analysis in C++, Mark Allen Weiss, 4th Edition,
Pearson, 2014.
R4: Data Structures and Algorithms in C++, Adam Drozdek, 4 th edition, Cengage
Learning, 2012.
Lecture Plan:
Lect Learning Chapter in the Text
Topics to be covered
ure# Objectives Book
1 The role of DS What kinds of problems are solved by R2 (1)
and Algorithms algorithms? Journey from problems to
in Computing. programs.
2 Introduction to Classes: Class Structure, Constructors, Class R1 (1.5, 1.6)
C++. Friends and Class Members, Standard
Template Library (STL), An example C++
program.
3-4 To understand Object Oriented Design: Goals, Principles R1 (2.1, 2.2, 2.3)
the features of and Design Patterns; Inheritance and
Object Oriented Polymorphism; Interfaces and abstract
Paradigm. classes; Templates.
5-7 Implementing Using arrays, Insertion and removal from a R1 (3.1, 3.2, 3.3,
elementary Linked list, generic single linked list, doubly 3.5)
data structures linked lists, circular linked lists, linear and
and algorithms. binary recursion.
8-9 Understanding Functions: Linear, N-Log-N, Quadratic R1 (4.1, 4.2), R2 (2,
techniques for functions etc., Asymptotic notation and 3)
Algorithm asymptotic analysis, Using Big-Oh notation,
analysis. Examples of analysis.
10-12 Stack ADT, Array-based stack R1 (5.1, 5.2)
Implementing implementation, stack implementation
more common using generic linked list, Applications of
data structures stacks: matching tags in an HTML
and algorithms document; Queue ADT, Array-based and
like Stacks, circular linked list based implementation.
13 Queues, Double-Ended queue: Deque ADT, R1 (5.3)
Deques, Implementing using doubly linked lists,
Vectors, List Adapters: Implementing stack using Deque.
14 ADTs, Vector ADT, Simple Array-based R1 (6.1)
Sequences, and implementation; Extendable array based
Trees. Using implementation (Amortization) and STL
Amortization to Vectors.
15-16 perform a set List ADT: Node based operations and R1 (6.2, 6.3, 6.4)
of push Iterators, doubly linked list
operations on a implementation, Sequence ADT,
vector. Applications: Bubble sort on sequences,
and its analysis.
17-18 General Trees: Properties and functions, R1 (7.1, 7.2, 7.3)
Traversal algorithms: Pre order, post order
traversals, Binary tree: ADTs, Linked and
Vector structures for Binary trees, Binary
tree traversal, Template function pattern.
19-21 Priority Queue ADT, Implementing using R1 (8.1, 8.2, 8.3)
Lists, Algorithms suitable for Priority
queues, Heap: Complete binary trees and
Implementing their representation, Implementing Heaps
Advanced data using Priority queue, Heap sort as an
structures like example.
22-24 Priority Map ADT, Implementation using Lists, Hash R1 (9.1, 9.2, 9.4)
queues, Heaps, tables: Bucket arrays, hash functions,
Hash tables, compression functions, collision-handling
Maps, Skip lists, schemes, Rehashing into a new table,
Dictionaries, Implementation of hash tables, Skip lists:
Search Trees. Search and update operation
implementations.
25 Dictionary ADT: Implementation with R1 (9.5)
location-aware entries.
26-28 Binary Search Trees: Operations and R1 (10.1, 10.2,
Analysis, AVL Trees: Insertion and deletion, 10.4, 10.5)
Analysis, Multi-way search trees, Red-Black
Trees: Operations and analysis.
29-30 Merge sort: Divide and conquer, merging R1 (11.1, 11.2)
Understanding arrays and lists, running time of merge
various basic sort; Quick sort: Randomized quick sort.
Algorithmic Sorting through algorithmic lens: Lower R1 (11.2, 11.3)
31- techniques and bound, Linear time: Bucket and Radix sort,
33 usage of Comparing sorting algorithms.
appropriate
34-35 data structures Strings and Dynamic programming: String R1 (12.1, 12.2)
along with operations, Matrix Chain-Product as an
their example, Applying Dynamic programming
applications to LCS problems.
36-37 and analysis. Pattern matching algorithms: Brute force, R1 (12.3)
Boyer-Moore algorithm, KMP algorithm,
Pattern matching using Tries.
38-39 Graph Algorithms: Graph ADT, Data R1 (13.1, 13.2)
structures for graphs: Edge list, Adjacency
list, Adjacency matrix.
40 Graph Traversals: DFS, and BFS, Traversing R1 (13.4)
a Diagraph, Transitive closure.
41-42 Shortest path and MST: Dijkstra, Kruskal, R1 (13.5, 13.6)
and Prim-Jarnik algorithms.
Evaluation Scheme:
Component Duratio Weighta Date & Time Nature
n ge
Mid sem Test 90 mins. 20% 13/10 - 4.00 - 5.30PM Closed
Book
Class Interaction In the 15% In the class (best 25/30) Quiz
class (Open)
Lab Interaction In the 15% In the lab (best 10/ 13) Quiz
lab (Open)
Lab Test (One) 60 mins. 10% To be announced Open
Book
Programming - 10% To be announced Take
Assignments (1) Home
Comprehensive 180 30% 19/12 AN Part Open
examination mins.
Note: minimum 40% of the evaluation to be completed by midsem grading.
Make-up-Policy:
Make-up exams will be strictly granted on prior permission and on genuine
grounds only. A request email should reach the I/C on or before the test.
Course Notices and Material:
Course material pertaining to this course will be made available on a regular basis
on the course webpage in googleclass page and will be used for notices,
announcements, grades, quizzes, and googlemeet recordings. Programming
assignments will have a demo/ viva monthly once.
Consultation Hour:
To be announced in the class.
Academic Honesty and Integrity Policy:
Academic honesty and integrity are to be maintained by all the students throughout
the semester and no type of academic dishonesty is acceptable.
Instructor-In-Charge, BITS F232