0% found this document useful (0 votes)
35 views18 pages

Circular_20250122151006_cho_22cs036_(advanced_data_structures)

The document outlines the course plan for 'Advanced Data Structures' at Chitkara University Institute of Engineering and Technology for the 2024-2025 session. It includes course objectives, learning outcomes, recommended books, tools, and a detailed lecture schedule covering various topics such as arrays, strings, recursion, and algorithms. The course aims to equip students with a deep understanding of data structures and algorithms, preparing them for interviews and practical applications.

Uploaded by

archita1335.be22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views18 pages

Circular_20250122151006_cho_22cs036_(advanced_data_structures)

The document outlines the course plan for 'Advanced Data Structures' at Chitkara University Institute of Engineering and Technology for the 2024-2025 session. It includes course objectives, learning outcomes, recommended books, tools, and a detailed lecture schedule covering various topics such as arrays, strings, recursion, and algorithms. The course aims to equip students with a deep understanding of data structures and algorithms, preparing them for interviews and practical applications.

Uploaded by

archita1335.be22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Course Plan

A. Course Handout (Version 1.0)

Institute/School Name Chitkara University Institute of Engineering and Technology


Department Name Department of Computer Science & Engineering
Programme Name Bachelor of Engineering (B.E.), Computer Science & Engineering
Course Name Advanced Data Structures Session 2024-2025
Course Code 22CS036 Semester/Batch 6th/2022
L-T-P (Per Week) 2-0-4 Course Credits 04
Data Structures and Algorithms
Pre-requisite NHEQF Level 06

Course Coordinator Dr. Suhasini SDG Number 4,8,9

Understand the detailed view of data structures and algorithms with underlying
CLO01 mathematics behind it.
Revisit Object Oriented fundamentals along with the concepts of other linear data
CLO02
structures like Linked lists and Stacks and nonlinear data structures like Graphs, Tries,
Binary Trees and its variations; with main emphasis on Interview based questions.
CLO03 Explore various algorithm strategies such as DP, Greedy Method, Backtracking and Bit-
masking.
Analyze and evaluate different data structures and will be able to prepare well for Interview
CLO04 panels through numerical understanding of the concepts.

CLO05 Implement the concepts of data structures and algorithms on several forums like code-chef,
coding ninjas, GFG and Hacker Rank.

1. Objectives of the Course


The course provides a wide scope of learning & understanding of the subject and the main objectives of
the course are:
 To understand the detailed view of Arrays, Strings, Recursion, Backtracking.
 To learn object-oriented basics with strong up-skilling on various linear and nonlinear data structures.
 To explore and implement various algorithm design strategies using examples.
 To analyze and evaluate different data structures.
 To implement the concepts of data structures and algorithms by solving complex engineering
problems and preparing well for interviews, competitions and hackathons.

2. Course Learning Outcomes: After completion of the course, student should be able to:
Course Learning Outcome
*POs **CL ***KC Sessions
Understand the detailed view of data structures PO1,PO2,PO3, K2 Factual, 24
CLO01 and algorithms with underlying mathematics PO4, PO9, Conceptual
behind it. PO11, PO12
Revisit Object Oriented fundamentals along with PO1,PO2,PO3, K3 Conceptual, 30
CLO02
the concepts of other linear data structures like PO4, PO9, Procedural
Linked lists and Stacks and nonlinear data PO11, PO12
structures like Graphs, Tries, Binary Trees and its
variations; with main emphasis on Interview
based questions.
CLO03 Explore various algorithm strategies such as DP, PO1,PO2,PO3, K3 Conceptual, 30
Greedy Method, Backtracking and Bit-masking. PO4, PO9, Procedural
PO11, PO12

Advanced Data Structures / CS192 Page 1 of 10


Course Plan

Analyze and evaluate different data structures PO1,PO2,PO3, K4 Conceptual, 20


CLO04 and will be able to prepare well for Interview PO4, PO9, Procedural
panels through numerical understanding of the PO11, PO12
concepts.
CLO05 Implement the concepts of data structures and PO1,PO2,PO3, K3 Conceptual, 8
algorithms on several forums like code-chef, PO4, PO9, Procedural
coding ninjas, GFG and Hacker Rank. PO11, PO12
Total Contact Hours 112

Revised Bloom’s Taxonomy Terminology


* PO’s available at (shorturl.at/cryzF)
**Cognitive Level =CL
***Knowledge Categories = KC

Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
Outcomes
CO1 H H M H M M L
CO2 H M H
CO3 H H M H L
CO4 M
CO5 M M M L M L L
H=High, M=Medium, L=Low

3. ERISE Grid Mapping

Feature Enablement Level (1-5, 5 being highest)


Entrepreneurship 2
Research 4
Innovation 3
Skills 5
Employability 5

4. Recommended Books:
B01. Computer Algorithms by E. Horowitz, S. Sahni and S. Rajsekran, Computer Science Press, New York,
ISBN – 0-7167-8316-9.
B02. Introduction to Algorithms, Second Edition, Thomas H. Cormen, Charles E. Leiserson, Ronald L.
Rivest, Clifford Stein, MIT Press, Cambridge, Massachusetts London, England McGraw-Hill Book
Company, ISBN 0-262-03293-7.
B03. Data Structures with C (Schaum's Outline Series) (English, Paperback, Lipschutz Seymour),
McGrawHill Education India, ISBN: 9780070701984, 9780070701984
B04. Design & Analysis of Computer Algorithms (English, Paperback, Aho Alfred V.), Pearson Education
India, ISBN: 9788131702055, 9788131702055
B05. Data Structures and Algorithms Made Easy (English, Paperback, Karumanchi Narasimha),
Karumanchi Narasimha, Careermonk Publications, ISBN: 9788193245279, 9788193245279.

5. Other readings and relevant websites:

S.N. Link of Journals, Magazines, Websites, and Research Papers


1. https://onlinecourses.nptel.ac.in/noc22_cs26/preview
2. https://www.youtube.com/watch?v=zWg7U0OEAoE
3. https://iq.opengenus.org/list-of-advanced-data-structures/
4. https://in.coursera.org/learn/advanced-data-structures

Advanced Data Structures / CS192 Page 2 of 10


Course Plan

5. https://www.geeksforgeeks.org/advanced-data-structures/
6. https://www.youtube.com/@JennyslecturesCSIT/videos

6. Recommended Tools and Platforms

Testpad, Windows 10 or higher / Ubuntu 21.04, GCC Compiler, IDE, Visual Studio

7. Course Plan:

Lecture Topics Recommended


No. Books / Resources
1-6 Arrays and Advanced Array Algorithms -1: Frequency Arrays; Prefix Arrays; Two pointers B03
and problems related to above mentioned topics:
 Checking if two strings are anagrams.
 Finding the mode of an array in constant time after pre-processing.
 Finding the sum of elements within a given range.
 Problems related to continuous subarrays, like finding maximum or minimum
sums.
 Finding all pairs that sum up to a given value.
 Moving two pointers in opposite directions to find palindromes, meet in the
middle, etc.
7-10 Arrays and Advanced Array Algorithms -2: Advance Problems on Sorting: B04
 Sorting an array to find the kth smallest or largest element.
 Given an array with values representing colors (often {0, 1, 2} for three colors),
sort them in place.
 In a sorted array, find two numbers that add up to a specific target. This problem
can be solved using two pointers after sorting.
11-18 Advanced String Algorithms: Implementation Problems on Strings, Two pointers in Strings B01
will be discussed and problems based on that.
 Check if a given string is a palindrome by ignoring non-alphanumeric characters
and case.
 Given two strings, find the smallest substring in the first string that contains all
characters of the second string.
 Determine if a string can be constructed by repeating a substring.
 Finding exact matches of short strings within larger texts.
 Compress a string by replacing sequences of repeating characters with the
character followed by the count (e.g., "aaabb" becomes "a3b2").
 Basic Calculator: Parse and evaluate a simple arithmetic expression.
 String Matching Algorithms like KMP, Z Function, and Rabin Karp will be
discussed and problems based on that.
19-22 Sliding Window: Advance Problems on Sliding Window B02
 Find the longest substring where all characters are unique using The sliding
window approach
 Counting elements that satisfy a condition within a window (e.g., number of
distinct characters in a substring).
 Given an array of integers and an integer K, find the maximum sum of a subarray
of length K.
23-24 Recursion: Basics of Recursion, basic problems on recursion to have better understanding B02
of the call stack, Types of Recursion. Problems:
 Given a sorted array, find the position of a target element using recursion.
 Generate all permutations of a string.
 Towers of Hanoi
25-30 Recursion Backtracking: Implementation based Problems on recursion will be discussed in B02
a thorough manner with call stacks, Introduction to Backtracking and problems on
backtracking to get the flow of it:
Advanced Data Structures / CS192 Page 3 of 10
Course Plan

 Given a set of distinct integers, generate all possible subsets (the power set).
 Place n queens on an n x n chessboard so that no two queens threaten each
other.
 Given a grid where some cells are passable and others are blocked, find all paths
for a rat to move from the top-left to the bottom-right cell.
 Given an array of integers and a target, find all unique combinations where the
sum equals the target.
FA 1
(Syllabus Covered from Lecture 1 - 30 and Binary Search: Binary Search, Its Implementation and Advance Binary
Search problems)
31-34 Advance problems on backtracking: Recursion on Matrix: Discussion on how recursion B02
and backtracking are used in general to solve problems on matrix/grid.
 Given a 2D grid of letters and a word, determine if the word can be constructed
from adjacent cells (horizontally or vertically).
 In a grid with obstacles, find the number of unique paths from the top-left to
the bottom-right corner.
 Solve a 9x9 Sudoku board by filling empty cells so each row, column, and 3x3
grid contains unique digits from 1 to 9.
35-38 Linked List: Interview Based Problems on LL. B02
 Detect if a linked list has a cycle and remove it if one exists.
 Given two sorted linked lists, merge them into a single sorted list.
 Determine if a linked list is a palindrome.
 Remove the N-th node from the end of a list in one pass.
39-47 Stacks: Interview Problems Based on Stacks. B02
 Given a string containing (, ), {, }, [, and ], determine if the string contains valid
parentheses.
 Design a stack that supports push, pop, top, and retrieving the minimum
element in constant time.
 Given an array representing the heights of bars in a histogram, find the area of
the largest rectangle that can be formed.
 Given a circular array of integers, find the next greater element for each
element. If no such element exists, return -1.
48-56 Binary Trees and BST: Standard Problems on Binary Trees and Binary Search Trees; B02, B05
Interview Problems Based on Trees.
 Given the root of a binary tree, return the inorder traversal of its nodes' values.
 Return the level order traversal of a binary tree's nodes.
 Find the maximum depth of a binary tree.
 Given a binary search tree (BST) and two nodes, find their lowest common
ancestor (LCA).
 Return all root-to-leaf paths in a binary tree.
 Given preorder and inorder traversal of a tree, construct the binary tree.
 Find the k-th smallest element in a BST.
ST1( Syllabus Covered from Lecture 1-56)
57-67 Hash maps : Advance Hashing Techniques, Interview Problems based Hashing etc.; B01, B02, B05
 Given a string and an integer K, find the length of the longest substring with at
most K distinct characters.
 Given two strings, s and t, find the smallest substring in s that contains all
characters in t.
 Given a string, find the length of the longest substring without repeating
characters.
 Given an array of integers and a target integer k, find the total number of
subarrays whose sum equals k.
68-75 Priority Queue and Greedy Algorithms: Advance Problems on Heaps. Implementation B01, B02, B05
and Advance Problems on Greedy.
 Find the kth largest element in an unsorted array.

Advanced Data Structures / CS192 Page 4 of 10


Course Plan

 Given k sorted linked lists, merge them into one sorted list.
 Given a non-empty array of integers, return the k most frequent elements.
 Given a set of activities with start and finish times, select the maximum number
of activities that don't overlap.
 Given a set of characters and their frequencies, build the optimal prefix-free
binary tree for data compression (Huffman Coding).

76-84 Bit-masking: Interview Based Problems on Bit Manipulations. B04
 Given an array of integers, every element appears twice except for one. Find
that single one.
 Given an integer n, count how many 1 bits it has (Brian Kernighan's
Algorithm).
 Given an integer, reverse its bits.
 Given an integer n, find how many times the number 1 appears in the binary
representation of all numbers from 1 to n.
 Given a set of distinct integers, return all possible subsets (the power set).
FA 2
(Syllabus Covered from Lecture 57-84 and Concept of OOPS with real world examples)
85-92 DP - 1: DP company oriented questions and problems: B04
 Given two strings, find the longest substring they share. This can be solved with
dynamic programming or efficient rolling hashes.
 Find the longest palindromic substring in a given string. This can be solved by
expanding around centers or using dynamic programming.
 Identify the longest substring that appears at least twice. Often solved with
suffix arrays or suffix trees.
 Using dynamic programming to find the edit distance between two strings.

93-100 DP – 2: DP Patterns and Multi-dimensional DP B02


 Match patterns with wildcards in strings.
 Given a set of items, each with a weight and a value, determine the maximum
value you can carry in a knapsack of limited capacity, where you can take
fractions of items.
 Given two strings, find the length of the longest subsequence that appears in
both strings.
 Given an array of integers, find the length of the longest strictly increasing
subsequence.
 Given a set of coin denominations, find the minimum number of coins required
to make a given amount.
 Given two strings, find the minimum number of operations (insertions,
deletions, and substitutions) required to convert one string to another.
101-104 DP – 3: DP on Trees. B02
 Find the diameter of a binary tree. The diameter of a tree is the length of the
longest path between any two nodes in the tree.
 Find the maximum sum of values along any path from any node to any other
node in a binary tree. The path can start and end at any node and doesn't
necessarily pass through the root.
ST2( Syllabus Covered from Lecture 1-104)
105-112 Graphs and Tries: Problems based on the graphs and Advance problems on Graphs. B02
 Given an undirected or directed graph, represent it using an Using dynamic
programming to find the edit distance between two strings.
 Given a graph, use BFS to find the shortest path from a starting node to all
other nodes.
 Given a graph, use DFS to traverse all nodes.
 Given a directed graph, detect if it contains a cycle.
 Given a graph with non-negative weights, find the shortest path from a source

Advanced Data Structures / CS192 Page 5 of 10


Course Plan

node to all other nodes using Dijkstra’s algorithm.


 Given a graph with weights (which could be negative), find the shortest path
from the source node to all other nodes using the Bellman-Ford algorithm.
 Given a directed acyclic graph (DAG), perform a Topological Sort.
 Given a connected, undirected graph with weighted edges, find the Minimum
Spanning Tree (MST) using Kruskal’s Algorithm.
 Basic problems, Range Queries and Interview Problems on Tries.

END TERM – FULL SYLLABUS

8. Delivery/Instructional Resources

Lecture Audio-Video
Topics Web References
Numbers References
1-6 Arrays and Advanced Array Algorithms -1: Frequency Arrays; https://www.geeksf https://www.youtu
Prefix Arrays; Two pointers and problems related to above orgeeks.org/ be.com/watch?v=cl
mentioned topics: KBWNdDE5c
 Checking if two strings are anagrams.
 Finding the mode of an array in constant time after
pre-processing.
 Finding the sum of elements within a given range.
 Problems related to continuous subarrays, like finding
maximum or minimum sums.
 Finding all pairs that sum up to a given value.
 Moving two pointers in opposite directions to find
palindromes, meet in the middle, etc.
7-10 Arrays and Advanced Array Algorithms -2: Advance Problems https://www.geeks https://www.youtu
on Sorting: forgeeks.org/ be.com/watch?v=cl
 Sorting an array to find the kth smallest or largest KBWNdDE5c
element.
 Given an array with values representing colors (often
{0, 1, 2} for three colors), sort them in place.
 In a sorted array, find two numbers that add up to a
specific target. This problem can be solved using two
pointers after sorting.
11-18 Advanced String Algorithms: Implementation Problems on https://www.geeks https://www.youtu
Strings, Two pointers in Strings will be discussed and problems forgeeks.org/ be.com/watch?v=cl
based on that. KBWNdDE5c
 Check if a given string is a palindrome by ignoring non-
alphanumeric characters and case.
 Given two strings, find the smallest substring in the
first string that contains all characters of the second
string.
 Determine if a string can be constructed by repeating a
substring.
 Finding exact matches of short strings within larger
texts.
 Compress a string by replacing sequences of repeating
characters with the character followed by the count
(e.g., "aaabb" becomes "a3b2").
 Basic Calculator: Parse and evaluate a simple
arithmetic expression.
 String Matching Algorithms like KMP, Z Function, and
Rabin Karp will be discussed and problems based on
that.

Advanced Data Structures / CS192 Page 6 of 10


Course Plan

19-22 Sliding Window: Advance Problems on Sliding Window https://www.geeksf https://www.youtu


 Find the longest substring where all characters are orgeeks.org/ be.com/watch?v=cl
unique using The sliding window approach KBWNdDE5c
 Counting elements that satisfy a condition within a
window (e.g., number of distinct characters in a
substring).
 Given an array of integers and an integer K, find the
maximum sum of a subarray of length K.
23-24 Recursion: Basics of Recursion, basic problems on recursion to https://www.geeksf https://www.youtu
have better understanding of the call stack, Types of orgeeks.org/ be.com/watch?v=cl
Recursion. Problems: KBWNdDE5c
 Given a sorted array, find the position of a target
element using recursion.
 Generate all permutations of a string.
 Towers of Hanoi
25-30 Recursion Backtracking: Implementation based Problems on https://www.geeksf https://www.youtu
recursion will be discussed in a thorough manner with call orgeeks.org/r be.com/watch?v=cl
stacks, Introduction to Backtracking and problems on ecursive-functions/ KBWNdDE5c
backtracking to get the flow of it:
 Given a set of distinct integers, generate all possible
subsets (the power set).
 Place n queens on an n x n chessboard so that no two
queens threaten each other.
 Given a grid where some cells are passable and others
are blocked, find all paths for a rat to move from the
top-left to the bottom-right cell.
 Given an array of integers and a target, find all unique
combinations where the sum equals the target.
31-34 Advance problems on backtracking: Recursion on Matrix: https://www.coding https://www.youtu
Discussion on how recursion and backtracking are used in ninjas.com/bl be.com/watch?v=cl
general to solve problems on matrix/grid. og/2021/05/24/rec KBWNdDE5c
 Given a 2D grid of letters and a word, determine if the ursion-
word can be constructed from adjacent cells
backtracking-
(horizontally or vertically).
 In a grid with obstacles, find the number of unique algorithm-with-
paths from the top-left to the bottom-right corner. practice-problem/
 Solve a 9x9 Sudoku board by filling empty cells so each
row, column, and 3x3 grid contains unique digits from https://www.geeksf
1 to 9. orgeeks.org/t op-
20-backtracking-
algorithm-
interview-
questions/
35-38 Linked List: Interview Based Problems on LL. https://www.geeksf https://www.youtu
 Detect if a linked list has a cycle and remove it if one orgeeks.org/ be.com/watch?v=cl
exists. KBWNdDE5c
 Given two sorted linked lists, merge them into a single
sorted list.
 Determine if a linked list is a palindrome.
 Remove the N-th node from the end of a list in one
pass.

Advanced Data Structures / CS192 Page 7 of 10


Course Plan

39-47 Stacks: Interview Problems Based on Stacks. https://www.youtu


 Given a string containing (, ), {, }, [, and ], determine if https://www.geeksf be.com/watch?v=cl
the string contains valid parentheses. orgeeks.org/ KBWNdDE5c
 Design a stack that supports push, pop, top, and
retrieving the minimum element in constant time.
 Given an array representing the heights of bars in a
histogram, find the area of the largest rectangle that
can be formed.
 Given a circular array of integers, find the next greater
element for each element. If no such element exists,
return -1.
48-56 Binary Trees and BST: Standard Problems on Binary Trees and https://www.geeks https://www.youtu
Binary Search Trees; Interview Problems Based on Trees. forgeeks.org/ be.com/watch?v=cl
 Given the root of a binary tree, return the inorder KBWNdDE5c
traversal of its nodes' values.
 Return the level order traversal of a binary tree's
nodes.
 Find the maximum depth of a binary tree.
 Given a binary search tree (BST) and two nodes, find
their lowest common ancestor (LCA).
 Return all root-to-leaf paths in a binary tree.
 Given preorder and inorder traversal of a tree,
construct the binary tree.
 Find the k-th smallest element in a BST.
57-65 Hash maps : Advance Hashing Techniques, Interview Problems https://www.geeks https://www.youtu
based Hashing etc.; forgeeks.org/ be.com/watch?v=cl
 Given a string and an integer K, find the length of the KBWNdDE5c
longest substring with at most K distinct characters.
 Given two strings, s and t, find the smallest substring in
s that contains all characters in t.
 Given a string, find the length of the longest substring
without repeating characters.
 Given an array of integers and a target integer k, find
the total number of subarrays whose sum equals k.
67-75 Priority Queue and Greedy Algorithms: Advance Problems on https://www.geek https://www.youtu
Heaps. Implementation and Advance Problems on Greedy. sforgeeks.org/ be.com/watch?v=cl
 Find the kth largest element in an unsorted array. KBWNdDE5c
 Given k sorted linked lists, merge them into one sorted
list.
 Given a non-empty array of integers, return the k most
frequent elements.
 Given a set of activities with start and finish times,
select the maximum number of activities that don't
overlap.
 Given a set of characters and their frequencies, build
the optimal prefix-free binary tree for data
compression (Huffman Coding).

76-84 Bit-masking: Interview Based Problems on Bit Manipulations. https://www.geeks https://www.youtu
 Given an array of integers, every element appears forgeeks.org/ be.com/watch?v=cl
twice except for one. Find that single one. KBWNdDE5c
 Given an integer n, count how many 1 bits it has (Brian
Kernighan's Algorithm).
 Given an integer, reverse its bits.
 Given an integer n, find how many times the number 1

Advanced Data Structures / CS192 Page 8 of 10


Course Plan

appears in the binary representation of all numbers


from 1 to n.
 Given a set of distinct integers, return all possible
subsets (the power set).

85-92 DP - 1: DP company oriented questions and problems: https://www.geeksf https://www.youtu


 Given two strings, find the longest substring they orgeeks.org/ be.com/watch?v=cl
share. This can be solved with dynamic programming KBWNdDE5c
or efficient rolling hashes.
 Find the longest palindromic substring in a given string.
This can be solved by expanding around centers or
using dynamic programming.
 Identify the longest substring that appears at least
twice. Often solved with suffix arrays or suffix trees.
 Using dynamic programming to find the edit distance
between two strings.

93-100 DP – 2: DP Patterns and Multi-dimensional DP https://www.geeksfor https://www.youtu


 Match patterns with wildcards in strings. geeks.org/ be.com/watch?v=cl
 Given a set of items, each with a weight and a value, KBWNdDE5c
determine the maximum value you can carry in a
knapsack of limited capacity, where you can take
fractions of items.
 Given two strings, find the length of the longest
subsequence that appears in both strings.
 Given an array of integers, find the length of the
longest strictly increasing subsequence.
 Given a set of coin denominations, find the minimum
number of coins required to make a given amount.
 Given two strings, find the minimum number of
operations (insertions, deletions, and substitutions)
required to convert one string to another.
101-104 DP – 3: DP on Trees. https://www.geek https://www.youtu
 Find the diameter of a binary tree. The diameter of a sforgeeks.org/ be.com/watch?v=cl
tree is the length of the longest path between any two KBWNdDE5c
nodes in the tree.
 Find the maximum sum of values along any path from
any node to any other node in a binary tree. The path
can start and end at any node and doesn't necessarily
pass through the root.
105-112 Graphs and Tries: Problems based on the graphs and Advance https://www.geeks https://www.youtu
problems on Graphs. forgeeks.org/ be.com/watch?v=cl
 Given an undirected or directed graph, represent it detect-cycle- KBWNdDE5c
using an Using dynamic programming to find the edit undirected-graph/
distance between two strings.
 Given a graph, use BFS to find the shortest path from a
starting node to all other nodes. https://www.geeksf
 Given a graph, use DFS to traverse all nodes. orgeeks.org/t
 Given a directed graph, detect if it contains a cycle. opological-sorting/
 Given a graph with non-negative weights, find the
shortest path from a source node to all other nodes https://practice.gee
using Dijkstra’s algorithm. ksforgeeks.or
 Given a graph with weights (which could be negative), g/problems/strongl
find the shortest path from the source node to all

Advanced Data Structures / CS192 Page 9 of 10


Course Plan

other nodes using the Bellman-Ford algorithm. y-connected-


 Given a directed acyclic graph (DAG), perform a components-
Topological Sort. kosarajus-algo/1
 Given a connected, undirected graph with weighted
edges, find the Minimum Spanning Tree (MST) using
https://www.geeksf
Kruskal’s Algorithm.
 Basic problems, Range Queries and Interview Problems orgeeks.org/k
on Tries ruskals-minimum-
spanning-tree-
algorithm-greedy-
algo-2/

https://www.geeksf
orgeeks.org/
dijkstras-shortest-
path-algorithm-
greedy-algo-7/

https://www.geeks
forgeeks.org/
bellman-ford-
algorithm-dp-23/

https://www.codin
gninjas.com/c
odestudio/library/i
mportant- graph-
problems-for-
interviews-
advanced-
problems

9. Lab Plan

Lab No. Experiments Learning Resources

1-6 Arrays and Advanced Array Algorithms -1: Frequency Arrays; Prefix Arrays; Two https://www.geeksfo
pointers and problems related to above mentioned topics: rgeeks.org/
 Checking if two strings are anagrams.
 Finding the mode of an array in constant time after pre-processing.
 Finding the sum of elements within a given range.
 Problems related to continuous subarrays, like finding maximum or minimum
sums.
 Finding all pairs that sum up to a given value.
 Moving two pointers in opposite directions to find palindromes, meet in the
middle, etc.
7-10 Arrays and Advanced Array Algorithms -2: Advance Problems on Sorting:
 Sorting an array to find the kth smallest or largest element. https://www.geeksf
 Given an array with values representing colors (often {0, 1, 2} for three colors), orgeeks.org/
sort them in place.
 In a sorted array, find two numbers that add up to a specific target. This
problem can be solved using two pointers after sorting.
11-18 Advanced String Algorithms: Implementation Problems on Strings, Two pointers in
Strings will be discussed and problems based on that.

Advanced Data Structures / CS192 Page 10 of 10


Course Plan

 Check if a given string is a palindrome by ignoring non-alphanumeric characters https://www.geeksf


and case. orgeeks.org/
 Given two strings, find the smallest substring in the first string that contains all
characters of the second string.
 Determine if a string can be constructed by repeating a substring.
 Finding exact matches of short strings within larger texts.
 Compress a string by replacing sequences of repeating characters with the
character followed by the count (e.g., "aaabb" becomes "a3b2").
 Basic Calculator: Parse and evaluate a simple arithmetic expression.
 String Matching Algorithms like KMP, Z Function, and Rabin Karp will be
discussed and problems based on that.
19-22 Sliding Window: Advance Problems on Sliding Window https://www.geeksfo
 Find the longest substring where all characters are unique using The sliding rgeeks.org/
window approach
 Counting elements that satisfy a condition within a window (e.g., number of
distinct characters in a substring).
 Given an array of integers and an integer K, find the maximum sum of a
subarray of length K.
23-24 Recursion: Basics of Recursion, basic problems on recursion to have better
understanding of the call stack, Types of Recursion. Problems: https://www.geeksfo
 Given a sorted array, find the position of a target element using recursion. rgeeks.org/
 Generate all permutations of a string.
 Towers of Hanoi
25-30 Recursion Backtracking: Implementation based Problems on recursion will be discussed https://www.geeksf
in a thorough manner with call stacks, Introduction to Backtracking and problems on orgeeks.org/r
backtracking to get the flow of it: ecursive-functions/
 Given a set of distinct integers, generate all possible subsets (the power set).
 Place n queens on an n x n chessboard so that no two queens threaten each
other.
 Given a grid where some cells are passable and others are blocked, find all
paths for a rat to move from the top-left to the bottom-right cell.
 Given an array of integers and a target, find all unique combinations where the
sum equals the target.
31-34 Advance problems on backtracking: Recursion on Matrix: Discussion on how recursion https://www.coding
and backtracking are used in general to solve problems on matrix/grid. ninjas.com/bl
 Given a 2D grid of letters and a word, determine if the word can be constructed og/2021/05/24/recu
from adjacent cells (horizontally or vertically).
rsion- backtracking-
 In a grid with obstacles, find the number of unique paths from the top-left to
algorithm-with-
the bottom-right corner.
 Solve a 9x9 Sudoku board by filling empty cells so each row, column, and 3x3 practice-problem/
grid contains unique digits from 1 to 9.
https://www.geeksf
orgeeks.org/t op-20-
backtracking-
algorithm-
interview-
questions/
35-38 Linked List: Interview Based Problems on LL. https://www.geeksfo
 Detect if a linked list has a cycle and remove it if one exists. rgeeks.org/
 Given two sorted linked lists, merge them into a single sorted list.
 Determine if a linked list is a palindrome.
 Remove the N-th node from the end of a list in one pass.
39-47 Stacks: Interview Problems Based on Stacks.
 Given a string containing (, ), {, }, [, and ], determine if the string contains valid https://www.geeksfo
parentheses. rgeeks.org/
Advanced Data Structures / CS192 Page 11 of 10
Course Plan

 Design a stack that supports push, pop, top, and retrieving the minimum
element in constant time.
 Given an array representing the heights of bars in a histogram, find the area of
the largest rectangle that can be formed.
 Given a circular array of integers, find the next greater element for each
element. If no such element exists, return -1.
48-56 Binary Trees and BST: Standard Problems on Binary Trees and Binary Search Trees; https://www.geeks
Interview Problems Based on Trees. forgeeks.org/
 Given the root of a binary tree, return the inorder traversal of its nodes' values.
 Return the level order traversal of a binary tree's nodes.
 Find the maximum depth of a binary tree.
 Given a binary search tree (BST) and two nodes, find their lowest common
ancestor (LCA).
 Return all root-to-leaf paths in a binary tree.
 Given preorder and inorder traversal of a tree, construct the binary tree.
 Find the k-th smallest element in a BST.
57-65 Hash maps : Advance Hashing Techniques, Interview Problems based Hashing etc.; https://www.geeksf
 Given a string and an integer K, find the length of the longest substring with at orgeeks.org/
most K distinct characters.
 Given two strings, s and t, find the smallest substring in s that contains all
characters in t.
 Given a string, find the length of the longest substring without repeating
characters.
 Given an array of integers and a target integer k, find the total number of
subarrays whose sum equals k.
67-75 Priority Queue and Greedy Algorithms: Advance Problems on Heaps. Implementation https://www.geeks
and Advance Problems on Greedy. forgeeks.org/
 Find the kth largest element in an unsorted array.
 Given k sorted linked lists, merge them into one sorted list.
 Given a non-empty array of integers, return the k most frequent elements.
 Given a set of activities with start and finish times, select the maximum number
of activities that don't overlap.
 Given a set of characters and their frequencies, build the optimal prefix-free
binary tree for data compression (Huffman Coding).

76-84 Bit-masking: Interview Based Problems on Bit Manipulations. https://www.geeksf
 Given an array of integers, every element appears twice except for one. Find orgeeks.org/
that single one.
 Given an integer n, count how many 1 bits it has (Brian Kernighan's
Algorithm).
 Given an integer, reverse its bits.
 Given an integer n, find how many times the number 1 appears in the binary
representation of all numbers from 1 to n.
 Given a set of distinct integers, return all possible subsets (the power set).
85-92 DP - 1: DP company oriented questions and problems: https://www.geeksf
 Given two strings, find the longest substring they share. This can be solved with orgeeks.org/
dynamic programming or efficient rolling hashes.
 Find the longest palindromic substring in a given string. This can be solved by
expanding around centers or using dynamic programming.
 Identify the longest substring that appears at least twice. Often solved with
suffix arrays or suffix trees.
 Using dynamic programming to find the edit distance between two strings.

93-100 DP – 2: DP Patterns and Multi-dimensional DP https://www.geeksfor


 Match patterns with wildcards in strings. geeks.org/

Advanced Data Structures / CS192 Page 12 of 10


Course Plan

 Given a set of items, each with a weight and a value, determine the maximum
value you can carry in a knapsack of limited capacity, where you can take
fractions of items.
 Given two strings, find the length of the longest subsequence that appears in
both strings.
 Given an array of integers, find the length of the longest strictly increasing
subsequence.
 Given a set of coin denominations, find the minimum number of coins required
to make a given amount.
 Given two strings, find the minimum number of operations (insertions,
deletions, and substitutions) required to convert one string to another.
101-104 DP – 3: DP on Trees. https://www.geeks
 Find the diameter of a binary tree. The diameter of a tree is the length of the forgeeks.org/
longest path between any two nodes in the tree.
 Find the maximum sum of values along any path from any node to any other
node in a binary tree. The path can start and end at any node and doesn't
necessarily pass through the root.
105-112 Graphs and Tries: Problems based on the graphs and Advance problems on Graphs. https://www.geeks
 Given an undirected or directed graph, represent it using an Using dynamic forgeeks.org/
programming to find the edit distance between two strings. detect-cycle-
 Given a graph, use BFS to find the shortest path from a starting node to all undirected-graph/
other nodes.
 Given a graph, use DFS to traverse all nodes.
https://www.geeksf
 Given a directed graph, detect if it contains a cycle.
 Given a graph with non-negative weights, find the shortest path from a source orgeeks.org/t
node to all other nodes using Dijkstra’s algorithm. opological-sorting/
 Given a graph with weights (which could be negative), find the shortest path
from the source node to all other nodes using the Bellman-Ford algorithm. https://practice.gee
 Given a directed acyclic graph (DAG), perform a Topological Sort. ksforgeeks.or
 Given a connected, undirected graph with weighted edges, find the Minimum g/problems/strongly
Spanning Tree (MST) using Kruskal’s Algorithm.
-connected-
 Basic problems, Range Queries and Interview Problems on Tries.
components-
kosarajus-algo/1

https://www.geeksf
orgeeks.org/k
ruskals-minimum-
spanning-tree-
algorithm-greedy-
algo-2/

https://www.geeksf
orgeeks.org/
dijkstras-shortest-
path-algorithm-
greedy-algo-7/

https://www.geeks
forgeeks.org/
bellman-ford-
algorithm-dp-23/

Advanced Data Structures / CS192 Page 13 of 10


Course Plan

https://www.codin
gninjas.com/c
odestudio/library/i
mportant- graph-
problems-for-
interviews-
advanced-problems
END TERM – FULL SYLLABUS**

**Note: Topics and Problems mentioned above must be covered for the full syllabus. Additional problems related to
topics of the syllabus above can be covered (if required).

10. Action plan for different types of learners

Slow Learners Average Learners Fast Learners


 Remedial Classes on Saturdays  Workshops  Engaging students to hold hands of
 Encouragement for improvement  Formative Exercises used slow learners by creating a Peer
using Peer Tutoring to highlight concepts and Tutoring Group
 Use of Audio and Visual Materials notions  Design solutions for complex
 Use of Real-Life Examples  E-notes and E-exercises to problems
read ahead of the pedagogic  Design solutions for
material. complex problems
 Presentation on topics beyond
those covered in CHO

11. Evaluation Scheme & Components

Evaluation No. of Weightage of Mode of


Type of Component
Component Assessments Component Assessment

Online(On-Campus)
Component 1 Formative Assessment (FA) 02# 10%

Online(On-Campus)
Component 2 Sessional Tests (STs) 02* 30%

Component 3 End Term Examination 01 60% Online(On-Campus)

Total 100%

* Out of 02 STs, Best 1 ST for final marks evaluation of STs will be considered.
#Out of 02 FAs, Best 1 FA for final marks evaluation of FAs will be considered.
**As per Academic Guidelines, a minimum of 75% attendance is required to become eligible for appearing in the
End Semester Examination

Advanced Data Structures / CS192 Page 14 of 10


Course Plan

12. Syllabus of the Course:

Subject: Advanced Data Structures Subject Code:CS192


Topic(s) Lectures Weightage
Arrays and Advanced Array Algorithms -1: Frequency Arrays; Prefix Arrays; Two pointers and
problems related to above mentioned topics:
 Checking if two strings are anagrams.
 Finding the mode of an array in constant time after pre-processing.
 Finding the sum of elements within a given range. 6 6%
 Problems related to continuous subarrays, like finding maximum or minimum sums.
 Finding all pairs that sum up to a given value.
 Moving two pointers in opposite directions to find palindromes, meet in the middle,
etc.

Arrays and Advanced Array Algorithms -2: Advance Problems on Sorting:


 Sorting an array to find the kth smallest or largest element.
 Given an array with values representing colors (often {0, 1, 2} for three colors), sort
4 6%
them in place.
 In a sorted array, find two numbers that add up to a specific target. This problem can
be solved using two pointers after sorting.

Advanced String Algorithms: Implementation Problems on Strings, Two pointers in Strings


will be discussed and problems based on that.
 Check if a given string is a palindrome by ignoring non-alphanumeric characters and
case.
 Given two strings, find the smallest substring in the first string that contains all
characters of the second string. 6%
 Determine if a string can be constructed by repeating a substring.
 Finding exact matches of short strings within larger texts.
 Compress a string by replacing sequences of repeating characters with the character
followed by the count (e.g., "aaabb" becomes "a3b2").
 Basic Calculator: Parse and evaluate a simple arithmetic expression. 8
Sliding Window: Advance Problems on Sliding Window
 Find the longest substring where all characters are unique using The sliding window
approach
 Counting elements that satisfy a condition within a window (e.g., number of distinct 6%
characters in a substring).
 Given an array of integers and an integer K, find the maximum sum of a subarray of
length K. 4
Recursion: Basics of Recursion, basic problems on recursion to have better understanding of
the call stack, Types of Recursion. Problems:
 Given a sorted array, find the position of a target element using recursion.
 Generate all permutations of a string.
 Towers of Hanoi

Advanced Data Structures / CS192 Page 15 of 10


Course Plan

Recursion Backtracking: Implementation based Problems on recursion will be discussed in a


thorough manner with call stacks, Introduction to Backtracking and problems on backtracking
to get the flow of it:
 Given a set of distinct integers, generate all possible subsets (the power set).
 Place n queens on an n x n chessboard so that no two queens threaten each other.
 Given a grid where some cells are passable and others are blocked, find all paths for
a rat to move from the top-left to the bottom-right cell. 15%
 Given an array of integers and a target, find all unique combinations where the sum
equals the target.
Advance problems on backtracking: Recursion on Matrix: Discussion on how recursion and
backtracking are used in general to solve problems on matrix/grid.
 Given a 2D grid of letters and a word, determine if the word can be constructed from
adjacent cells (horizontally or vertically).
 In a grid with obstacles, find the number of unique paths from the top-left to the
bottom-right corner.
 Solve a 9x9 Sudoku board by filling empty cells so each row, column, and 3x3 grid
contains unique digits from 1 to 9. 12
Linked List: Interview Based Problems on LL.
 Detect if a linked list has a cycle and remove it if one exists.
 Given two sorted linked lists, merge them into a single sorted list. 6%
 Determine if a linked list is a palindrome.
 Remove the N-th node from the end of a list in one pass. 4
Stacks: Interview Problems Based on Stacks.
 Given a string containing (, ), {, }, [, and ], determine if the string contains valid
parentheses.
 Design a stack that supports push, pop, top, and retrieving the minimum element in
constant time. 6%
 Given an array representing the heights of bars in a histogram, find the area of the
largest rectangle that can be formed.
 Given a circular array of integers, find the next greater element for each element. If
no such element exists, return -1. 8
Binary Trees and BST: Standard Problems on Binary Trees and Binary Search Trees; Interview
Problems Based on Trees.
 Given the root of a binary tree, return the inorder traversal of its nodes' values.
 Return the level order traversal of a binary tree's nodes.
 Find the maximum depth of a binary tree.
10%
 Given a binary search tree (BST) and two nodes, find their lowest common ancestor
(LCA).
 Return all root-to-leaf paths in a binary tree.
 Given preorder and inorder traversal of a tree, construct the binary tree.
 Find the k-th smallest element in a BST. 8
Hash maps : Advance Hashing Techniques, Interview Problems based Hashing etc.;
 Given a string and an integer K, find the length of the longest substring with at most
K distinct characters.
 Given two strings, s and t, find the smallest substring in s that contains all characters
6%
in t.
 Given a string, find the length of the longest substring without repeating characters.
 Given an array of integers and a target integer k, find the total number of subarrays
whose sum equals k. 8

Advanced Data Structures / CS192 Page 16 of 10


Course Plan

Priority Queue and Greedy Algorithms: Advance Problems on Heaps. Implementation and
Advance Problems on Greedy.
 Find the kth largest element in an unsorted array.
 Given k sorted linked lists, merge them into one sorted list.
 Given a non-empty array of integers, return the k most frequent elements.
 Given a set of activities with start and finish times, select the maximum number of
activities that don't overlap.
 Given a set of characters and their frequencies, build the optimal prefix-free binary
tree for data compression (Huffman Coding) 10%
Bit-masking: Interview Based Problems on Bit Manipulations.
 Given an array of integers, every element appears twice except for one. Find that
single one.
 Given an integer n, count how many 1 bits it has (Brian Kernighan's Algorithm).
 Given an integer, reverse its bits.
 Given an integer n, find how many times the number 1 appears in the binary
representation of all numbers from 1 to n.
 Given a set of distinct integers, return all possible subsets (the power set). 15
DP - 1: DP company oriented questions and problems:
 Given two strings, find the longest substring they share. This can be solved with
dynamic programming or efficient rolling hashes.
 Find the longest palindromic substring in a given string. This can be solved by
expanding around centers or using dynamic programming.
 Identify the longest substring that appears at least twice. Often solved with suffix
arrays or suffix trees.
 Using dynamic programming to find the edit distance between two strings.

DP – 2: DP Patterns and Multi-dimensional DP


 Match patterns with wildcards in strings.
 Given a set of items, each with a weight and a value, determine the maximum value
you can carry in a knapsack of limited capacity, where you can take fractions of
items.
18%
 Given two strings, find the length of the longest subsequence that appears in both
strings.
 Given an array of integers, find the length of the longest strictly increasing
subsequence.
 Given a set of coin denominations, find the minimum number of coins required to
make a given amount.
 Given two strings, find the minimum number of operations (insertions, deletions,
and substitutions) required to convert one string to another.
DP – 3: DP on Trees.
 Find the diameter of a binary tree. The diameter of a tree is the length of the longest
path between any two nodes in the tree.
 Find the maximum sum of values along any path from any node to any other node in
a binary tree. The path can start and end at any node and doesn't necessarily pass
through the root. 24
Graphs and Tries: Problems based on the graphs and Advance problems on Graphs.
 Given an undirected or directed graph, represent it using an Using dynamic
programming to find the edit distance between two strings.
 Given a graph, use BFS to find the shortest path from a starting node to all other
nodes.
5%
 Given a graph, use DFS to traverse all nodes.
 Given a directed graph, detect if it contains a cycle.
 Given a graph with non-negative weights, find the shortest path from a source node
to all other nodes using Dijkstra’s algorithm.
 Given a graph with weights (which could be negative), find the shortest path from 11

Advanced Data Structures / CS192 Page 17 of 10


Course Plan

the source node to all other nodes using the Bellman-Ford algorithm.
 Given a directed acyclic graph (DAG), perform a Topological Sort.
 Given a connected, undirected graph with weighted edges, find the Minimum
Spanning Tree (MST) using Kruskal’s Algorithm.
 Basic problems, Range Queries and Interview Problems on Tries.

This Document is approved by:

Designation Name Signature


Course Coordinator Dr. Suhasini
Head-Academic Delivery Dr. Susheela Hooda
Dean Dr. Rupali Gill
Date 10.01.2025

Advanced Data Structures / CS192 Page 18 of 10

You might also like