[go: up one dir, main page]

0% found this document useful (0 votes)
24 views7 pages

150 Data Structures and Algorithms Problems

The document lists 150 data structures and algorithms problems categorized by difficulty and topic, including arrays, linked lists, binary search, sliding window, two pointers, stacks & queues, BFS & DFS, recursion, backtracking, trees, dynamic programming, and graphs. Each category contains specific problems along with their difficulty levels, providing a comprehensive resource for practice. It also includes reading materials for various topics to aid in understanding the concepts.

Uploaded by

nitin.pandey
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)
24 views7 pages

150 Data Structures and Algorithms Problems

The document lists 150 data structures and algorithms problems categorized by difficulty and topic, including arrays, linked lists, binary search, sliding window, two pointers, stacks & queues, BFS & DFS, recursion, backtracking, trees, dynamic programming, and graphs. Each category contains specific problems along with their difficulty levels, providing a comprehensive resource for practice. It also includes reading materials for various topics to aid in understanding the concepts.

Uploaded by

nitin.pandey
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/ 7

3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

150 Data Structures and


Algorithms Problems
Arrays
Easy
• Roman to Integer
• Valid Parentheses
• Remove Duplicates from Sorted Array
• Remove Element
• Best Time to Buy and Sell Stock
• Best Time to Buy and Sell Stock II
• Intersection of Two Arrays II
• Single Number
• Contains Duplicate
• Plus One
• Move Zeroes
• Rotate Image

Medium
• 3Sum
• 4Sum
• Find First and Last Position of Element in Sorted Array
• Group Anagrams
• Reduce Array Size to The Half
• Merge Intervals

Linked List
Easy
• Delete Node in a Linked List

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 1/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

• Remove Nth Node From End of List


• Merge Two Sorted Lists
• Palindrome Linked List
• Linked List Cycle

Medium
• Intersection of Two Linked Lists
• Remove Linked List Elements
• Middle of the Linked List
• Merge k Sorted Lists

Binary Search
Easy
• Binary Search
• Intersection of Two Arrays
• First Bad Version
• Arranging Coins
• Search Insert Position

Medium
• Search in Rotated Sorted Array
• Find First and Last Position of Element in Sorted Array
• Kth Smallest Element in a BST
• Find Peak Element
• Split Array Largest Sum

Sliding Window
Reading Material
• Leetcode Pattern 2 | Sliding Windows for Strings
Easy/Medium

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 2/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

• Longest Substring Without Repeating Characters


• Find All Anagrams in a String
• Minimum Window Substring
• Count Number of Nice Subarrays
• Fruit Into Baskets

Two Pointers
• Intersection of Two Arrays
• Maximum Ascending Subarray Sum
• Backspace String Compare
• Long Pressed Name
• Fruit Into Baskets
• Max Consecutive Ones III
• Container With Most Water

Stacks & Queues


Easy
• Valid Parentheses
• Implement Queue Using Stacks
• Min Stack
Medium
• Design Circular Queue
• Decode String
• Open the Lock
• Daily Temperatures
• Minimum Add to Make Parentheses Valid

BFS & DFS


Reading Material

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 3/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

• Leetcode Pattern 1 | BFS + DFS == 25% of the problems — part 1


• Leetcode Pattern 1 | DFS + BFS == 25% of the problems — part 2
Problems
• Flood Fill
• Binary Tree Preorder Traversal
• Number of Islands
• Walls and Gates
• Max Area of Island
• Number of Provinces
• Perfect Squares
• Course Schedule
• Detect Cycle in Undirected Graph
• Word Ladder
• 01 Matrix
• Rotting Oranges
• Perfect Squares
• All Paths From Source to Target
• Number of Closed Islands

Recursion
Easy
• Fibonacci Number (#509)
• Reverse String
• Swap Nodes in Pairs (#24)
• Reverse Linked List (#206)
• Search in a Binary Search Tree (#700)
• Climbing Stairs (#70)
• Pow(x, n) (#50)

Backtracking

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 4/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

Reading Material
• Leetcode Pattern 3 | Backtracking
• A general approach to backtracking questions in Java (Subsets, Permutations,
Combination Sum, Palindrome Partitioning)

Easy
• Word Search
• Subsets (#78)
• Subsets II (#90)
• Letter Case Permutation

Medium
• Combination Sum (#39)
• Letter Combinations of a Phone Number (#17)
• Combinations
• Combination Sum II
• Combination Sum III (#216)
• Combination Sum IV
• Permutations (#46)
• Permutations II (#47)
• Next Permutation (#31)
• N-Queens (#51)

Trees
Reading Material
• Leetcode Pattern 0 | Iterative traversals on Trees
Easy
• Binary Tree Preorder Traversal
• Binary Tree Inorder Traversal
• Binary Tree Postorder Traversal
• Validate Binary Search Tree

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 5/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

• Minimum Distance Between BST Nodes


• Symmetric Tree
• Same Tree
• Path Sum
• Maximum Depth of Binary Tree
• Convert Sorted Array to Binary Search Tree

Medium
• Validate Binary Search Tree
• Binary Search Tree Iterator
• Unique Binary Search Trees
• Serialize and Deserialize BST
• Binary Tree Right Side View
• Binary Tree Level Order Traversal
• Binary Tree Level Order Traversal II
• Binary Tree Zigzag Level Order Traversal

Dynamic Programming
Easy
• Maximum Subarray
• Fibonacci Number
• Climbing Stairs
• Min Cost Climbing Stairs
• N-th Tribonacci Number

Medium
• Coin Change
• Minimum Falling Path Sum
• Minimum Cost for Tickets
• 2 Keys Keyboard
• Maximum Product Subarray

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 6/7
3/17/25, 1:48 PM 150 Data Structures and Algorithms Problems

• Triangle
• Ones and Zeroes
• Longest Arithmetic Subsequence
• Partition Equal Subset Sum
• House Robber
• Decode Ways
• Word Break
• Edit Distance
• Longest Increasing Subsequence

Graphs
Easy
• Employee Importance
• Find the Town Judge
Medium
• Course Schedule II
• Redundant Connection
• Surrounded Regions
• Accounts Merge
• Network Delay Time
• Is Graph Bipartite
• Find Eventual Safe States

https://titanium-tray-e39.notion.site/150-Data-Structures-and-Algorithms-Problems-1a8c3f3f47a2801ba028d2643b756374 7/7

You might also like