0% found this document useful (0 votes)
11 views9 pages

DSA Cohort Questions

The document outlines a comprehensive list of data structures and algorithms (DSA) questions categorized into various topics such as Basics of Programming, Recursion and Backtracking, Basic Data Structures, Advanced Data Structures, and Dynamic Programming, totaling 265 problems. Each category includes specific problem examples, ranging from introductory programming tasks to advanced data structure manipulations and dynamic programming challenges. The document serves as a structured guide for learners to practice and enhance their DSA skills.

Uploaded by

chayanpant.cp
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)
11 views9 pages

DSA Cohort Questions

The document outlines a comprehensive list of data structures and algorithms (DSA) questions categorized into various topics such as Basics of Programming, Recursion and Backtracking, Basic Data Structures, Advanced Data Structures, and Dynamic Programming, totaling 265 problems. Each category includes specific problem examples, ranging from introductory programming tasks to advanced data structure manipulations and dynamic programming challenges. The document serves as a structured guide for learners to practice and enhance their DSA skills.

Uploaded by

chayanpant.cp
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/ 9

DSA Question Count

Basics of Programming (68)


2D Arrays (10)
Functions and Arrays (18)
Getting Started (14)
Patterns (20)
String, String Builder And ArrayList (6)

Recursion and Backtracking (30)


Introduction to Recursion (8)
Recursion Backtracking (4)
Recursion in Array (6)
Recursion on the way up (7)
Recursion with ArrayLists (5)

Basic Data Structures (95)


Binary Search Tree (7)
Binary Tree (16)
Generic Tree (23)
Linked List (24)
Stacks and Queues (25)

Advanced Data Structure (27)


Graphs (17)
Hashmap and Heap (10)

Dynamic Programming (45)


Dynamic Programming and Greedy (29)
Time and Space Complexity (16)
Grand Total: 265
PROBLEMS
Basics of Programming
2D Arrays

2d Arrays Demo
Exit Point Of A Matrix
Matrix Multiplication
Ring Rotate
Rotate By 90 Degree
Saddle Price
Search In A Sorted 2d Array
Spiral Display
The State Of Wakanda - 1
The State Of Wakanda - 2

Functions and Arrays

Any Base Addition


Any Base Multiplication
Any Base Subtraction
Any Base To Any Base
Any Base To Decimal
Bar Chart
Broken Economy
Decimal To Any Base
Difference Of Two Arrays
Digit Frequency
Find Element In An Array
First Index And Last Index
Inverse Of An Array
Reverse An Array
Rotate An Array
Span Of Array
Subarray Problem
Subsets Of Array
Sum Of Two Arrays
Getting Started

Count Digits In A Number


Digits Of A Number
Gcd And Lcm
Grading System
Inverse Of A Number
Is A Number Prime
Prime Factorisation Of A Number
Print All Primes Till N
Print Fibonacci Numbers Till N
Print Z
Pythagorean Triplet
Reverse A Number
Rotate A Number
The Curious Case Of Benjamin Bulbs

Patterns

Pattern 1
Pattern 2
Pattern 3
Pattern 4
Pattern 5
Pattern 6
Pattern 7
Pattern 8
Pattern 9
Pattern 10
Pattern 11
Pattern 12
Pattern 13
Pattern 14
Pattern 15
Pattern 16
Pattern 17
Pattern 18
Pattern 19
Pattern 20

String, String Builder And ArrayList

Print All Palindromic Substrings


Print All Permutations Of A String Iteratively
Remove Primes
String Compression
String With Difference Of Every Two Consecutive Characters
Toggle Case

Recursion and Backtracking


Introduction to Recursion

Factorial.cpp
Power-linear.cpp
Power-logarithmic
Print Decreasing
Print Increasing
Print Increasing Decreasing
Print Zigzag
Tower Of Hanoi

Recursion Backtracking

Flood Fill
Knights Tour
N Queens
Target Sum Subsets

Recursion in Array

All Indices Of Array


Display Array
Display Array In Reverse
First Index
Last Index
Max Of An Array

Recursion on the way up

Print Encodings
Print Kpc
Print Maze Paths
Print Maze Paths With Jumps
Print Permutations
Print Stair Paths
Print Subsequence

Recursion with ArrayLists

Get Kpc
Get Maze Path With Jumps
Get Maze Paths
Get Stair Paths
Get Subsequence

Basic Data Structures


Binary Search Tree

Add Node To Bst


Lca Of Bst
Print In Range
Remove Node From Bst
Replace With Sum Of Larger
Size, Sum, Max, Min, Find In Bst
Target Sum Pair In Bst

Binary Tree

Diameter Of A Binary Tree


Find And Nodetorootpath In Binary Tree
Is A Binary Search Tree
Is Balanced Tree
Iterative Pre, Post And Inorder Traversals Of Binary Tree
Largest Bst Subtree
Levelorder Traversal Of Binary Tree
Path To Leaf From Root In Range
Print K Levels Down
Print Nodes K Distance Away
Print Single Child Nodes
Remove Leaves In Binary Tree
Size, Sum, Maximum And Height Of A Binary Tree
Tilt Of Binary Tree
Transform To Left-cloned Tree
Transform To Normal From Left-cloned Tree

Generic Tree

Are Trees Mirror In Shape


Are Trees Similar In Shape
Ceil And Floor In Generic Tree
Diameter Of Generic Tree
Distance Between Two Nodes In A Generic Tree
Find In Generic Tree
Generic Tree - Traversals (pre-order, Post-order)
Height Of A Generic Tree
Is Generic Tree Symmetric
Iterative Preorder And Postorder Of Generic Tree
Kth Largest Element In Tree
Level-order Of Generic Tree
Levelorder Linewise (generic Tree)
Levelorder Linewise Zig Zag
Linearize A Generic Tree
Lowest Common Ancestor (generic Tree)
Maximum In A Generic Tree
Mirror A Generic Tree
Node To Root Path In Generic Tree
Node With Maximum Subtree Sum
Predecessor And Successor Of An Element
Remove Leaves In Generic Tree
Size Of Generic Tree

Linked List

Add At Index In Linked List


Add First In Linked List
Add Last In Linked List
Add Two Linked Lists
Display A Linkedlist
Display Reverse (recursive) - Linked List
Fold A Linked List
Get Value In Linked List
Intersection Point Of Linked Lists
Is Linked List A Palindrome?
K Reverse In Linked List
Kth Node From End Of Linked List
Linked List To Queue Adapter
Linked List To Stack Adapter
Merge Sort A Linked List
Merge Two Sorted Linked Lists
Mid Of Linked List
Odd Even Linked List
Remove At Index In Linked List
Remove Duplicates In A Sorted Linked List
Remove First In Linkedlist
Remove Last In Linked List
Reverse A Linked List (data Iterative)
Reverse Linked List (pointer - Recursive)
Reverse Linked List (pointer Iterative)
Stacks and Queues

Balanced Brackets
Celebrity Problem
Duplicate Brackets
Dynamic Queue
Dynamic Stack
Infix Conversions
Infix Evaluation
Largest Area Histogram
Merge Overlapping Interval
Minimum Stack - Constant Space
Minimum Stack - I
Next Greater Element To The Right
Normal Queue
Normal Stack
Postfix Evaluation And Conversions
Prefix Evaluation And Conversions
Queue To Stack Adapter - Pop Efficient
Queue To Stack Adapter - Push Efficient
Sliding Window Maximum
Smallest Number Following Pattern
Stack To Queue Adapter - Add Efficient
Stack To Queue Adapter - Remove Efficient
Stock Span
Two Stacks In An Array

Advanced Data Structure


Graphs

Breadth First Traversal.c++


Get Connected Components Of A Graph
Hamiltonian Path And Cycle
Has Path?
Is Graph Bipartite
Is Graph Connected
Is Graph Cyclic
Iterative Depth First Traversal
Knights Tour
Minimum Wire Required To Connect All Pcs
Multisolver - Smallest, Longest, Ceil, Floor, Kthlargest Path
Number Of Islands
Order Of Compilation
Perfect Friends
Print All Paths
Shortest Path In Weights
Spread Of Infection

Hashmap and Heap

Get Common Elements - 1


Get Common Elements - 2
Highest Frequency Character
K Largest Elements
Longest Consecutive Sequence Of Elements
Median Priority Queue
Merge K Sorted Lists
Sort K-sorted Array
Write Hashmap
Write Priority Queue Using Heap

Dynamic Programming
Dynamic Programming and Greedy

Arrange Buildings
Buy And Sell Stocks - Infinite Transactions Allowed
Buy And Sell Stocks - K Transactions Allowed
Buy And Sell Stocks - One Transaction Allowed
Buy And Sell Stocks - Two Transactions Allowed
Buy And Sell Stocks With Cooldown - Infinite Transaction Allowed
Buy And Sell Stocks With Transaction Fee - Infinite Transactions Allowed
Climb Stairs
Climb Stairs With Minimum Moves
Climb Stairs With Variable Jumps
Coin Change Combination
Coin Change Permutations
Count A+b+c+ Subsequences
Count Binary Strings
Count Encodings
Fibonacci-dp
Fractional Knapsack - Official
Friends Pairing
Goldmine
Maximum Sum Non Adjacent Elements
Min Cost In Maze Traversal
Paint Fence
Paint House
Paint House - Many Colors
Partition Into Subsets
Target Sum Subsets - Dp
Tiling With 2 * 1 Tiles
Tiling With M * 1 Tiles
Unbounded Knapsack
Zero One Knapsack

Time and Space Complexity

Bubble Sort
Count Sort
Insertion Sort
Merge Sort
Merge Two Sorted Arrays
Partition An Array
Pivot In Sorted And Rotated Array
Quick Select
Quick Sort
Radix Sort
Selection Sort
Sort 01
Sort 012
Sort Dates
Target Sum Pair 1

You might also like