0% found this document useful (0 votes)
12 views

dsa

The document provides a curated list of 50-70 important easy and medium-level LeetCode problems organized by category, including Arrays & Hashing, Two Pointers, Sliding Window, Linked Lists, Stacks and Queues, Binary Trees, Graphs, and Sorting & Searching. It emphasizes the significance of these problems for interview preparation and includes links to articles for mastering data structures and algorithms. The selection aims to build a solid foundation in problem-solving before progressing to more complex challenges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

dsa

The document provides a curated list of 50-70 important easy and medium-level LeetCode problems organized by category, including Arrays & Hashing, Two Pointers, Sliding Window, Linked Lists, Stacks and Queues, Binary Trees, Graphs, and Sorting & Searching. It emphasizes the significance of these problems for interview preparation and includes links to articles for mastering data structures and algorithms. The selection aims to build a solid foundation in problem-solving before progressing to more complex challenges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Here’s a condensed list of 50–70 important easy questions from your original set, organized by

category. This selection prioritizes the most common topics and problems frequently
encountered in interviews, allowing you to build a solid foundation before moving on to medium-
level questions.

### 1. Arrays & Hashing (10 Problems)


- Two Sum
- Contains Duplicate
- Valid Anagram
- Intersection of Two Arrays
- Majority Element
- Best Time to Buy and Sell Stock
- Maximum Subarray
- Pascal's Triangle
- Plus One
- Single Number

### 2. Two Pointers (8 Problems)


- Valid Palindrome
- Reverse String
- Remove Duplicates from Sorted Array
- Move Zeroes
- Squares of a Sorted Array
- Reverse Vowels of a String
- Two Sum II
- Intersection of Two Arrays II

### 3. Sliding Window (8 Problems)


- Longest Substring Without Repeating Characters
- Maximum Average Subarray I
- Subarray Sum Equals K
- Minimum Size Subarray Sum
- Grumpy Bookstore Owner
- Find All Anagrams in a String
- Fruit Into Baskets

### 4. Linked Lists (8 Problems)


- Merge Two Sorted Lists
- Linked List Cycle
- Reverse Linked List
- Palindrome Linked List
- Delete Node in a Linked List
- Remove Nth Node From End of List
- Intersection of Two Linked Lists
- Add Two Numbers

### 5. Stacks and Queues (8 Problems)


- Valid Parentheses
- Min Stack
- Implement Queue using Stacks
- Implement Stack using Queues
- Daily Temperatures
- Evaluate Reverse Polish Notation
- Next Greater Element I
- Binary Tree Level Order Traversal

### 6. Binary Trees (10 Problems)


- Maximum Depth of Binary Tree
- Invert Binary Tree
- Binary Tree Paths
- Diameter of Binary Tree
- Balanced Binary Tree
- Lowest Common Ancestor of a Binary Search Tree
- Binary Tree Inorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Postorder Traversal
- Symmetric Tree

### 7. Graphs (8 Problems)


- Number of Islands
- Flood Fill
- Clone Graph
- Course Schedule
- Max Area of Island
- Graph Valid Tree
- Find the Town Judge
- Word Ladder

### 8. Sorting & Searching (8 Problems)


- Binary Search
- First Bad Version
- Search Insert Position
- Kth Largest Element in an Array
- Top K Frequent Elements
- Find Smallest Letter Greater Than Target
- Find Peak Element
- Kth Largest Element in a Stream
This list focuses on problems that not only cover a wide range of important data structures and
algorithms but also are commonly referenced in interviews. Working through these questions
will give you a solid grasp of the fundamentals before tackling more complex problems.

---

Articles for Mastery of DSA and Patterns


- Array and Hashing:
- [5 Patterns for Arrays and Hashing](https://medium.com/swlh/5-patterns-for-array-and-
hashing-problems-8b5a020a7c7d)
- [Common Array Interview Questions and
Patterns](https://medium.com/javarevisited/common-array-interview-questions-patterns-
bd60f1c52a62)

- Two Pointers and Sliding Window:


- [The Two-Pointer Technique](https://medium.com/tech-interview-practice/solving-the-two-
pointer-problems-in-coding-interviews-bafef126cf22)
- [Sliding Window Problems](https://medium.com/codex/sliding-window-pattern-
bf6f1b5fce4e)

- Linked Lists:
- [How to Master Linked Lists for Interviews](https://medium.com/swlh/mastering-linked-lists-
237b8b29d3fc)

- Binary Trees and Graphs:


- [Binary Tree Traversal Patterns](https://medium.com/swlh/understanding-binary-tree-
traversal-techniques-17aaf1b23c62)
- [Graph Algorithms for Coding Interviews](https://medium.com/javarevisited/graph-
algorithms-for-coding-interviews-25ab1ab73f0d)

- Stacks and Queues:


- [Stack and Queue Interview Questions](https://medium.com/coderbyte/a-look-at-the-stack-
and-queue-data-structures-in-coding-interviews-fbe2dc8a237f)

- Sorting and Searching:


- [Sorting Patterns and Techniques](https://medium.com/javarevisited/master-sorting-
techniques-for-coding-interviews-676c15615e97)
- [Binary Search Problems and
Patterns](https://medium.com/tech-interview-practice/mastering-binary-search-algorithms-for-
interviews-e0078e3cb16c)
These questions and resources will help you fully understand DSA patterns. Completing this
focused list should give you the confidence and skills to take on medium-level DSA challenges
and ultimately handle complex problems independently. Let me know if you'd like any further
tips!

Here are several Medium articles that can help you with your study plan for various data
structures and algorithms, particularly the LeetCode problems you've outlined.

## Arrays & Hashing


- **"LeetCode Meditations — Chapter 1: Arrays & Hashing"** by Eda Eren: This article provides
an overview of dynamic arrays and hash tables, discussing their structures, time complexities,
and practical applications in solving problems like those in your list. [2]
- **"SOLVING ALL Arrays & Hashmap | Blind75 LeetCode Problems"**: A video tutorial that
walks through common problems involving arrays and hashmaps, providing insights into
problem-solving strategies for the listed questions. [1]

## Two Pointers
- **"Two Pointers Technique in LeetCode"**: This article explains the two-pointer technique, its
applications, and how it can be effectively used to solve problems like "Valid Palindrome" and
"Remove Duplicates from Sorted Array." You can find similar articles on Medium that focus on
specific problems.

## Sliding Window
- **"Sliding Window Technique Explained"**: An article that covers the sliding window pattern,
detailing how to apply it to problems such as "Longest Substring Without Repeating Characters"
and "Minimum Size Subarray Sum." Look for articles that specifically analyze these problems.

## Linked Lists
- **"Mastering Linked Lists in LeetCode"**: This article discusses various linked list operations
and common interview questions related to linked lists, including "Merge Two Sorted Lists" and
"Palindrome Linked List."

## Stacks and Queues


- **"Understanding Stacks and Queues with LeetCode Examples"**: An in-depth look at stacks
and queues, explaining their implementations and how to tackle problems like "Valid
Parentheses" and "Min Stack."

## Binary Trees
- **"Binary Trees: A Comprehensive Guide"**: Articles that cover binary tree traversals (inorder,
preorder, postorder) and related problems such as "Maximum Depth of Binary Tree" or "Lowest
Common Ancestor."

## Graphs
- **"Graph Algorithms: BFS vs DFS"**: This article compares breadth-first search (BFS) and
depth-first search (DFS), essential for solving graph-related problems like "Number of Islands"
and "Course Schedule."

## Sorting & Searching


- **"Sorting Algorithms Explained with LeetCode Problems"**: An article that breaks down
sorting algorithms and binary search techniques, providing examples relevant to the questions
you've listed.

These resources should provide a solid foundation for tackling the problems in your study plan.
Each article typically includes explanations of concepts along with example problems from
platforms like LeetCode, which will be beneficial as you practice.

Citations:
[1] https://www.youtube.com/watch?v=JlbhUhTec-s
[2] https://rivea0.github.io/blog/leetcode-meditations-chapter-1-arrays-and-hashing
[3]
https://www.reddit.com/r/leetcode/comments/wpva0v/going_through_some_of_the_neetcodeio_
arrays_and/
[4] https://leetcode.com/problemset/algorithms/?difficulty=Easy&search=hash
[5] https://leetcode.com/problem-list/hash-table/
[6] https://leetcode.com/problem-list/mqidiin2/
[7] https://leetcode.com/discuss/study-guide/2138499/master-hashing-in-less-than-3-days

Here’s a curated list of 50–70 important medium-level LeetCode problems across various topics
to help you prepare for interviews. These problems cover key concepts and are frequently
asked in technical interviews.

### 1. Arrays & Hashing (10 Problems)


- [3Sum](https://leetcode.com/problems/3sum/)
- [Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
- [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
- [Group Anagrams](https://leetcode.com/problems/group-anagrams/)
- [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/)
- [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/)
- [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/)
- [Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/)
- [Long Pressed Name](https://leetcode.com/problems/long-pressed-name/)
- [Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/)

### 2. Two Pointers (8 Problems)


- [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/)
- [4Sum](https://leetcode.com/problems/4sum/)
- [Sort Colors](https://leetcode.com/problems/sort-colors/)
- [Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-
from-sorted-list-ii/)
- [Compare Version Numbers](https://leetcode.com/problems/compare-version-numbers/)
- [Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
- [Maximum Area of a Piece of Land](https://leetcode.com/problems/maximum-area-of-a-piece-
of-land/)
- [Rotate Array](https://leetcode.com/problems/rotate-array/)

### 3. Sliding Window (8 Problems)


- [Longest Substring with At Most K Distinct Characters](https://leetcode.com/problems/longest-
substring-with-at-most-k-distinct-characters/)
- [Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-
character-replacement/)
- [Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/)
- [Maximum Points You Can Obtain from Cards](https://leetcode.com/problems/maximum-
points-you-can-obtain-from-cards/)
- [Substring with Concatenation of All Words](https://leetcode.com/problems/substring-with-
concatenation-of-all-words/)
- [Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/)
- [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/)
- [Grumpy Bookstore Owner](https://leetcode.com/problems/grumpy-bookstore-owner/)

### 4. Linked Lists (8 Problems)


- [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/)
- [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/)
- [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/)
- [Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)
- [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-
end-of-list/)
- [Reorder List](https://leetcode.com/problems/reorder-list/)
- [Rotate List](https://leetcode.com/problems/rotate-list/)
- [Flatten a Multilevel Doubly Linked List](https://leetcode.com/problems/flatten-a-multilevel-
doubly-linked-list/)

### 5. Stacks and Queues (8 Problems)


- [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/)
- [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-
notation/)
- [Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/)
- [Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-
remove-to-make-valid-parentheses/)
- [Design a Stack with Increment Operation](https://leetcode.com/problems/design-a-stack-with-
increment-operation/)
- [Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-
histogram/)
- [Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/)
- [Trapping Rain Water II](https://leetcode.com/problems/trapping-rain-water-ii/)

### 6. Binary Trees (10 Problems)


- [Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/)
- [Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-
traversal-ii/)
- [Construct Binary Tree from Preorder and Inorder
Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-
traversal/)
- [Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)
- [Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-
ancestor-of-a-binary-tree/)
- [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-
sum/)
- [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)
- [Path Sum II](https://leetcode.com/problems/path-sum-ii/)
- [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-
traversal/)
- [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)

### 7. Graphs (8 Problems)


- [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/)
- [Number of Connected Components in an Undirected
Graph](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-
graph/)
- [Find the Town Judge](https://leetcode.com/problems/find-the-town-judge/)
- [Shortest Path in a Grid with Obstacles Elimination](https://leetcode.com/problems/shortest-
path-in-a-grid-with-obstacles-elimination/)
- [Min Cost to Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/)
- [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/)
- [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/)
- [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-
stops/)

### 8. Sorting & Searching (10 Problems)


- [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-
array/)
- [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-
array/)
- [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/)
- [Find Peak Element](https://leetcode.com/problems/find-peak-element/)
- [Merge Intervals](https://leetcode.com/problems/merge-intervals/)
- [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/)
- [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/)
- [Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-
numbers-after-self/)
- [Sort Colors](https://leetcode.com/problems/sort-colors/)
- [Closest Binary Search Tree Value II](https://leetcode.com/problems/closest-binary-search-
tree-value-ii/)

This list focuses on medium-level problems that are commonly asked in technical interviews,
covering a wide range of data structures and algorithms. Working through these problems will
help solidify your understanding and prepare you for real interview scenarios.

You might also like