Circular_20250122151006_cho_22cs036_(advanced_data_structures)
Circular_20250122151006_cho_22cs036_(advanced_data_structures)
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.
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
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
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. https://www.geeksforgeeks.org/advanced-data-structures/
6. https://www.youtube.com/@JennyslecturesCSIT/videos
Testpad, Windows 10 or higher / Ubuntu 21.04, GCC Compiler, IDE, Visual Studio
7. 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.
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.
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.
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
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.
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.
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/
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).
Online(On-Campus)
Component 1 Formative Assessment (FA) 02# 10%
Online(On-Campus)
Component 2 Sessional Tests (STs) 02* 30%
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
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.
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.