icon picker
DSA Questions - FULL LIST

Last edited 5 minutes ago by XS.

2
info
Keep your meetings on track. Slide to set your time frame, or right-click the slider to edit timer settings.
3
info

Set Timer for
000
10
minutes →
Start Timer
-

End time:
Thursday 12:00 AM
DSA Leetcode Questions Cheat sheets
Category
Problem Name
Difficulty (% Effort)
STATUS
Python
C++
Rust
URL
Scale
Number
ALGO (if used)
Notes
Text
Find The Duplicate Number
0
1
Floyd’s Algo - not implemented
Sort Colors
0
1
Used simple Insertion sort.
Remove Duplicates From Sorted Array
0
1
using set() or dict().
(HashSet or HashMap)
Set Matrix Zeroes
0
1
separate loops, scan and edit inplace
Move Zeroes
0
1
2 pointers
Best Time To Buy And Sell Stock
0
2
keep track of previous days minimum buy.
Chocolate Distribution Problem
0
1
sliding window and simple loop adjustments
Two Sum
0
2
hashmap or dictionary
Best Time To Buy And Sell Stock II
0
greedy, basically selling and buying again when a dip in price is found
Subarray Sums Divisible By K
0
1
HashMap + modulo arithmetic.
Tricky to visualize the subarrays on each step
Find All Duplicates In An Array
0
1
sort then loop through.
HashMap if not space constraints
Container With Most Water
0
3sum
0
1
single loop + 2 pointers
check for duplicates on outer as well as inner loops
4sum
0
Maximum Points You Can Obtain From Cards
0
1
sliding window, but for the remaining items.
convert right index to +ve if -ve
Subarray Sum Equals K
0
1
visualization is done using the approach of finding the number of times k less pref_sum were present.
Spiral Matrix
0
Word Search
0
1
backtracking
recursive approach
O(m * n * 4^L)
Jump Game
0
Merge Sorted Array
0
0
Majority Element
0
Reverse Pairs
0
Print All Possible Combinations Of R Elements In A Given Array Of Size N
0
Game Of Life
0
Max Value Of Equation
0
Insert Delete Getrandom O1 Duplicates Allowed
0
Largest Rectangle In Histogram
0
Max Value Of Equation
0
Valid Parentheses
0
1
Print All The Duplicates In The Input String
0
1
Implement Strstr
0
1
not really a 2 pointers just single pointer with right side handling to prevent out of bounds
Longest Common Prefix
0
1
take first word as prefix answer
compare with the next word, modify if necessary
keep doing it with next words
Valid Palindrome Ii
0
1
just call the similar function again in case of not match
Integer To Roman
0
Generate Parentheses
0
1
see the rust part for the backtracking and push pop.
Simplify Path
0
1
uses stack or queue
find all the valid folders of the path, put them into the stack
construct the path again
Smallest Window In A String Containing All The Characters Of Another String 1587115621
0
Reverse Words In A String
0
Rabin Karp Algorithm For Pattern Searching
0
Group Anagrams
0
Basic Calculator Ii
0
Valid Number
0
Integer To English Words
0
Minimum Window Substring
0
1
Text Justification
0
Boyer Moore Algorithm For Pattern Searching
0
Distinct Subsequences
0
Maximum Size Rectangle Binary Sub Matrix 1s
0
Find Number Of Islands
0
Given Matrix O X Replace O X Surrounded X
0
Spiral Matrix
0
Rotate Image
0
Minimum Moves To Equal Array Elements
0
Add Binary
0
Maximum Product Of Three Numbers
0
Excel Sheet Column Title
0
Happy Number
0
Palindrome Number
0
Missing Number
0
Reverse Integer
0
Power Of Two
0
Max Points On A Line
0
Valid Square
0
The Kth Factor Of N
0
Permute Two Arrays Sum Every Pair Greater Equal K
0
Ceiling In A Sorted Array
0
Find A Pair With The Given Difference
0
Permute Two Arrays Sum Every Pair Greater Equal K
0
Check Reversing Sub Array Make Array Sorted
0
Radix Sort
0
A Product Array Puzzle
0
1
Make Array Elements Equal Minimum Cost
0
Find Peak Element
0
Allocate Minimum Number Of Pages0937
0
Minimum Number Swaps Required Sort Array
0
AGGRCOW (SPOJ)
0
Search In Rotated Sorted Array
0
Count Of Smaller Numbers After Self
0
Split Array Largest Sum
0
Middle Of The Linked List
0
Linked List Cycle
0
Convert Binary Number In A Linked List To Integer
0
Remove Duplicates From Sorted List
0
Sort A Linked List Of 0s 1s Or 2s
0
Remove Linked List Elements
0
Merge Two Sorted Lists
0
Multiply Two Numbers Represented Linked Lists
0
Intersection Of Two Linked Lists
0
Given Only A Pointer To A Node To Be Deleted In A Singly Linked List How Do You Delete It
0
Palindrome Linked List
0
Reverse Linked List
0
Add Two Numbers
0
Copy List With Random Pointer
0
Add Two Numbers Ii
0
Reverse Linked List Ii
0
Reorder List
0
Remove Nth Node From End Of List
0
Flatten A Multilevel Doubly Linked List
0
Partition List
0
Remove Duplicates From Sorted List Ii
0
Linked List In Zig Zag Fashion
0
Sort List
0
Segregate Even And Odd Elements In A Linked List
0
Rearrange A Given Linked List In Place
0
Merge K Sorted Lists
0
Reverse Nodes In K Group
0
Merge Sort For Linked List
0
Flattening A Linked List
0
Subtract Two Numbers Represented As Linked Lists
0
Implement Queue Using Stacks
0
Backspace String Compare
0
Implement Stack Using Queues
0
Implement Stack Queue Using Deque
0
Next Greater Element I
0
Stack Set 4 Evaluation Postfix Expression
0
Implement Two Stacks In An Array
0
Minimum Cost Tree From Leaf Values
0
Daily Temperatures
0
Distance Of Nearest Cell Having 1 1587115620
0
Online Stock Span
0
Rotten Oranges2536
0
Sum Of Subarray Minimums
0
Evaluate Reverse Polish Notation
0
Circular Tour
0
Remove All Adjacent Duplicates In String Ii
0
Flatten Nested List Iterator
0
Find The Maximum Of Minimums For Every Window Size In A Given Array
0
Lru Cache Implementation
0
The Celebrity Problem
0
Diameter Of Binary Tree
0
Invert Binary Tree
0
Subtree Of Another Tree
0
Range Sum Of Bst
0
Symmetric Tree
0
Convert Sorted Array To Binary Search Tree
0
Merge Two Binary Trees
0
Maximum Depth Of Binary Tree
0
Binary Tree Paths
0
Same Tree
0
Lowest Common Ancestor Of A Binary Search Tree
0
Path Sum
0
Minimum Absolute Difference In Bst
0
Sum Of Left Leaves
0
Balanced Binary Tree
0
Binary Tree Inorder Traversal
0
Check Whether Bst Contains Dead End
0
Binary Search Tree Iterator
0
Lowest Common Ancestor Of A Binary Tree
0
Unique Binary Search Trees Ii
0
All Nodes Distance K In Binary Tree
0
Validate Binary Search Tree
0
Binary Tree Right Side View
0
Redundant Connection
0
Binary Tree Level Order Traversal
0
Path Sum Iii
0
Construct Binary Tree From Preorder And Postorder Traversal
0
Unique Binary Search Trees
0
Recover Binary Search Tree
0
Populating Next Right Pointers In Each Node
0
Flatten Binary Tree To Linked List
0
Maximum Width Of Binary Tree
0
Min Distance Between Two Given Nodes Of A Binary Tree
0
Kth Smallest Element In A Bst
0
Binary Tree Zigzag Level Order Traversal
0
Count Bst Nodes That Lie In A Given Range
0
Binary Tree Maximum Path Sum
0
Sum Of Distances In Tree
0
Binary Tree Cameras
0
Vertical Order Traversal Of A Binary Tree
0
Print K Sum Paths Binary Tree
0
Serialize And Deserialize Binary Tree
0
Find Median Bst Time O1 Space
0
Largest Bst Binary Tree Set 2
0
Construct Bst From Given Preorder Traversa
0
Depth First Search Or Dfs For A Graph
0
Number Of Islands
0
Flood Fill
0
Detect Cycle In An Undirected Graph
0
Detect Cycle In A Graph
0
Decode String
0
Shortest Bridge
0
Number Of Operations To Make Network Connected
0
Find Eventual Safe States
0
Strongly Connected Components Kosarajus Algo
0
Time Needed To Inform All Employees
0
Graph Coloring Applications
https://www.geeksforgeeks.org/graph-coloring-applications/#:~:text=Graph%20coloring%20problem%20is%20toare%20colored%20using%20same%20color.
0
Most Stones Removed With Same Row Or Column
0
As Far From Land As Possible
0
Find The City With The Smallest Number Of Neighbors At A Threshold Distance
0
Find Whether It Is Possible To Finish All Tasks Or Not From Given Dependencies
0
Prims Minimum Spanning Tree Mst Greedy Algo 5
0
Implementing Floyd Warshall2042
0
Evaluate Division
0
Snakes And Ladders
0
Cheapest Flights Within K Stops
0
Detect Negative Cycle Graph Bellman Ford
0
Bipartite Graph
0
Longest Increasing Path In A Matrix
0
Making A Large Island
0
Remove Boxes
0
Critical Connections In A Network
0
Water Jug Problem Using Bfs
0
Travelling Salesman Problem Set 1
0
Total Number Spanning Trees Graph
0
Word Ladder
0
Minimize Cash Flow Among Given Set Friends Borrowed Money
0
Design Add And Search Words Data Structure
0
Word Break Problem Trie Solution
0
Trie Insert And Search
0
Palindrome Pairs
0
Top K Frequent Elements
0
Kth Largest Element In An Array
0
Ugly Number Ii
0
Furthest Building You Can Reach
0
Kth Smallest Element In A Sorted Matrix
0
Reorganize String
0
Find The Most Competitive Subsequence
0
Smallest Positive Missing Number 1587115621
0
Largest Subarray With 0 Sum
0
K Closest Points To Origin
0
Minimum Number Of Refueling Stops
0
Minimum Cost To Hire K Workers
0
Swim In Rising Water
0
Sliding Window Maximum
0
Climbing Stairs
0
Maximum Product Subarray
0
Ones And Zeroes
0
Counting Bits
0
Knight Dialer
0
Cutted Segments1642
0
Unique Paths
0
Minimum Path Sum
0
Coin Change
0
Decode Ways
0
Maximum Length Of Repeated Subarray
0
Longest Increasing Subsequence
0
Longest Common Substring1452
0
Count Square Submatrices With All Ones
0
Maximal Square
0
Mobile Numeric Keypad5456
0
Weighted Job Scheduling
0
Delete And Earn
0
Range Sum Query 2d Immutable
0
Optimal Binary Search Tree Dp 24
0
Frog Jump
0
Best Time To Buy And Sell Stock Iv
0
Minimum Insertion Steps To Make A String Palindrome
0
Largest Area Rectangular Sub Matrix Equal Number 1s 0s
0
Trapping Rain Water
0
Minimum Cost To Merge Stones
0
Count Different Palindromic Subsequences
0
Maximal Rectangle
0
Burst Balloons
0
Super Egg Drop
0
Sort Colors
0
Longest Repeating Character Replacement
0
Maximum Number Of Visible Points
0
Gas Station
0
Minimum Cost For Acquiring All Coins With K Extra Coins Allowed With Every Coin
0
Restore The Array From Adjacent Pairs
0
Task Scheduler
0
Minimum Deletions To Make Character Frequencies Unique
0
Remove K Digits
0
CHOCOLA (SPOJ)
0
Non Overlapping Intervals
0
Minimum Deletion Cost To Avoid Repeating Letters
0
Minimum Sum Two Numbers Formed Digits Array 2
0
Combination Sum Ii
0
Subset Sum Problem2014
0
Combinations
0
Subsets Ii
0
M Coloring Problem 1587115620
0
Beautiful Arrangement
0
Palindrome Partitioning
0
Permutations Ii
0
Word Search Ii
0
Sudoku Solver
0
N Queens
0
Unique Paths Iii
0
Find Maximum Number Possible By Doing At Most K Swaps
0
Partition Set K Subsets Equal Sum
0
Tug Of War
0
Find Paths From Corner Cell To Middle Cell In Maze
0
Solving Cryptarithmetic Puzzles Backtracking 8
0
Print Palindromic Partitions String
0
Range Sum Query Immutable
0
Range Sum Query Mutable
0
Count Of Smaller Numbers After Self
0
Count Of Range Sum
0
There are no rows in this table
4

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.