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

LeedCode Sheet

Leedcode problems List

Uploaded by

sivat0322
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

LeedCode Sheet

Leedcode problems List

Uploaded by

sivat0322
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Array

1. Two Sum - Easy

2. Best Time to Buy and Sell Stock - Easy

3. Contains Duplicate - Easy

4. Product of Array Except Self - Medium

5. Rotate Array - Medium

6. 3Sum - Medium

7. 4Sum - Medium

8. Maximum Subarray - Easy

9. Find Minimum in Rotated Sorted Array - Medium

10. Search in Rotated Sorted Array - Medium

11. Kth Largest Element in an Array - Medium

12. Move Zeroes - Easy

13. Merge Intervals - Medium

14. Maximum Product Subarray - Medium

15. Subarray Sum Equals K - Medium

16. Maximum Sum of Subarray of Size K - Medium

17. Minimum Window Substring - Hard

18. Longest Substring Without Repeating Characters - Medium

19. Find All Anagrams in a String - Medium

20. Product of Array Except Self - Medium

21. Top K Frequent Elements - Medium

22. Find the Duplicate Number - Medium

23. Single Number - Easy

24. First Missing Positive - Hard

25. Maximum Length of Repeated Subarray - Medium

26. Intersection of Two Arrays - Easy

27. Daily Temperatures - Medium


28. Subarray Product Less Than K - Medium

29. Maximum Number of Occurrences of a Substring - Medium

30. Kth Smallest Element in a Sorted Matrix - Medium

2. String

1. Valid Parentheses - Easy

2. Longest Common Prefix - Easy

3. Palindrome - Easy

4. Group Anagrams - Medium

5. Count and Say - Easy

6. String to Integer (atoi) - Medium

7. Longest Palindromic Substring - Medium

8. Regular Expression Matching - Hard

9. Wildcard Matching - Hard

10. Reverse Words in a String - Medium

11. Implement strStr() - Easy

12. Anagrams - Medium

13. Minimum Window Substring - Hard

14. Longest Substring Without Repeating Characters - Medium

15. Find All Anagrams in a String - Medium

16. Decode String - Medium

17. Basic Calculator - Hard

18. Basic Calculator II - Medium

19. Count Vowels Permutation - Medium

20. Extract Unique Characters - Easy

21. Valid Anagram - Easy

22. String Compression - Medium

23. Multiply Strings - Medium

24. Find the Longest Substring - Medium

25. Remove All Adjacent Duplicates In String - Easy


26. Longest Substring with At Most Two Distinct Characters - Medium

27. Reorder Data in Log Files - Easy

28. Sentence Screen Fitting - Medium

29. Smallest Subsequence of Distinct Characters - Medium

30. Rotate String - Easy

3. Linked List

1. Reverse Linked List - Easy

2. Merge Two Sorted Lists - Easy

3. Add Two Numbers - Medium

4. Linked List Cycle - Easy

5. Detect Cycle in Linked List - Easy

6. Remove Nth Node From End of List - Medium

7. Reorder List - Medium

8. Intersection of Two Linked Lists - Easy

9. Swap Nodes in Pairs - Medium

10. Palindrome Linked List - Easy

11. Merge K Sorted Lists - Hard

12. Copy List with Random Pointer - Medium

13. Linked List Random Node - Medium

14. Rotate List - Medium

15. Sort List - Medium

16. Add Two Numbers II - Medium

17. Odd Even Linked List - Medium

18. Reverse Nodes in k-Group - Hard

19. Remove Duplicates from Sorted List II - Medium

20. Convert Binary Search Tree to Sorted Doubly Linked List - Medium

21. Linked List Cycle II - Medium

22. Add Two Numbers - Medium

23. Reverse Linked List II - Medium


24. Flatten a Multilevel Doubly Linked List - Medium

25. Remove Linked List Elements - Easy

26. Delete Node in a Linked List - Easy

27. Kth Largest Element in a Stream - Easy

28. Reverse Nodes in k-Group - Hard

29. Swap Nodes in Pairs - Medium

30. Linked List Components - Medium

Tree

1. Binary Tree Inorder Traversal - Easy

2. Binary Tree Preorder Traversal - Easy

3. Binary Tree Postorder Traversal - Easy

4. Maximum Depth of Binary Tree - Easy

5. Symmetric Tree - Easy

6. Convert Sorted Array to Binary Search Tree - Easy

7. Balanced Binary Tree - Easy

8. Path Sum - Easy

9. Same Tree - Easy

10. Binary Tree Level Order Traversal - Medium

11. Lowest Common Ancestor of a Binary Search Tree - Easy

12. Validate Binary Search Tree - Medium

13. Binary Tree Zigzag Level Order Traversal - Medium

14. Serialize and Deserialize Binary Tree - Hard

15. Construct Binary Tree from Preorder and Inorder Traversal - Medium

16. Maximum Width of Binary Tree - Medium

17. Diameter of Binary Tree - Easy

18. Unique Binary Search Trees - Medium

19. Count Complete Tree Nodes - Medium

20. Binary Search Tree Iterator - Medium

21. Kth Smallest Element in a BST - Medium


22. Flatten Binary Tree to Linked List - Medium

23. Maximum Path Sum - Hard

24. Recover Binary Search Tree - Medium

25. All Nodes Distance K in Binary Tree - Medium

26. Convert Binary Search Tree to Greater Tree - Medium

27. Invert Binary Tree - Easy

28. Merge Two Binary Trees - Easy

29. Binary Tree Pruning - Medium

30. Path Sum III - Medium

5. Graph Algorithms

1. Number of Islands - Medium

2. Clone Graph - Medium

3. Graph Valid Tree - Medium

4. Course Schedule - Medium

5. Course Schedule II - Medium

6. Word Ladder - Hard

7. Word Ladder II - Hard

8. Shortest Path in Binary Matrix - Medium

9. Minimum Height Trees - Medium

10. Number of Connected Components in an Undirected Graph - Medium

11. Surrounded Regions - Medium

12. Pacific Atlantic Water Flow - Medium

13. Find Eventual Safe States - Medium

14. Topological Sort of a Directed Graph - Medium

15. Word Ladder - Hard

16. Word Ladder II - Hard

17. Shortest Path in Binary Matrix - Medium

18. Minimum Height Trees - Medium

19. Number of Connected Components in an Undirected Graph - Medium


20. Surrounded Regions - Medium

21. Pacific Atlantic Water Flow - Medium

22. Find Eventual Safe States - Medium

23. Course Schedule II - Medium

24. Word Ladder - Hard

25. Word Ladder II - Hard

26. Shortest Path in Binary Matrix - Medium

27. Minimum Height Trees - Medium

28. Number of Connected Components in an Undirected Graph - Medium

29. Surrounded Regions - Medium

30. Find Eventual Safe States - Medium

6. Binary Search

1. Binary Search - Easy

2. Search Insert Position - Easy

3. Find Minimum in Rotated Sorted Array - Medium

4. Find Peak Element - Medium

5. Kth Smallest Element in a Sorted Matrix - Medium

6. Median of Two Sorted Arrays - Hard

7. Search in Rotated Sorted Array - Medium

8. Find K Closest Elements - Medium

9. Count of Smaller Numbers After Self - Hard

10. Square Root of X - Easy

11. Guess Number Higher or Lower - Easy

12. Search a 2D Matrix - Medium

13. Search a 2D Matrix II - Medium

14. Find the Duplicate Number - Medium

15. Find the Kth Largest Element in an Array - Medium

16. Median of Two Sorted Arrays - Hard

17. Count of Smaller Numbers After Self - Hard


18. Find K Closest Elements - Medium

19. Square Root of X - Easy

20. Guess Number Higher or Lower - Easy

21. Search a 2D Matrix - Medium

22. Search a 2D Matrix II - Medium

23. Find the Kth Largest Element in an Array - Medium

24. Find Minimum in Rotated Sorted Array - Medium

25. Find Peak Element - Medium

26. Kth Smallest Element in a Sorted Matrix - Medium

27. Median of Two Sorted Arrays - Hard

28. Search in Rotated Sorted Array - Medium

29. Count of Smaller Numbers After Self - Hard

30. Find K Closest Elements - Medium

Dynamic Programming

1. Climbing Stairs - Easy

2. House Robber - Medium

3. Maximum Subarray - Easy

4. Min Cost Climbing Stairs - Easy

5. Longest Increasing Subsequence - Medium

6. Edit Distance - Hard

7. Unique Paths - Medium

8. Unique Paths II - Medium

9. Jump Game - Medium

10. Coin Change - Medium

11. Longest Common Subsequence - Medium

12. Regular Expression Matching - Hard

13. Wildcard Matching - Hard

14. House Robber II - Medium

15. Minimum Path Sum - Medium


16. Maximum Product Subarray - Medium

17. Partition Equal Subset Sum - Medium

18. Longest Palindromic Substring - Medium

19. Longest Palindromic Subsequence - Medium

20. Minimum Number of Arrows to Burst Balloons - Medium

21. Edit Distance - Hard

22. House Robber - Medium

23. Longest Common Subsequence - Medium

24. Jump Game - Medium

25. Longest Increasing Subsequence - Medium

26. Minimum Path Sum - Medium

27. Regular Expression Matching - Hard

28. Wildcard Matching - Hard

29. Minimum Path Sum - Medium

30. Unique Paths II - Medium

8. Bit Manipulation

1. Single Number - Easy

2. Power of Two - Easy

3. Number of 1 Bits - Easy

4. Reverse Bits - Easy

5. Hamming Distance - Easy

6. Missing Number - Easy

7. Find the Duplicate Number - Medium

8. Single Number II - Medium

9. Single Number III - Medium

10. Counting Bits - Medium

11. Bitwise AND of Numbers Range - Medium

12. Single Number - Easy

13. Power of Two - Easy


14. Reverse Bits - Easy

15. Hamming Distance - Easy

16. Missing Number - Easy

17. Find the Duplicate Number - Medium

18. Single Number II - Medium

19. Single Number III - Medium

20. Counting Bits - Medium

21. Bitwise AND of Numbers Range - Medium

22. Single Number - Easy

23. Power of Two - Easy

24. Number of 1 Bits - Easy

25. Reverse Bits - Easy

26. Hamming Distance - Easy

27. Missing Number - Easy

28. Find the Duplicate Number - Medium

29. Single Number II - Medium

30. Single Number III – Medium

9. Two Pointers

1. Two Sum II - Input Array Is Sorted - Easy

2. Three Sum - Medium

3. Container With Most Water - Medium

4. Remove Duplicates from Sorted Array - Easy

5. Remove Element - Easy

6. Find the Duplicate Number - Medium

7. Sort Colors - Medium

8. Trapping Rain Water - Hard

9. Valid Palindrome - Easy

10. Palindrome Linked List - Easy

11. Minimum Window Substring - Hard


12. Longest Substring Without Repeating Characters - Medium

13. Longest Repeating Character Replacement - Medium

14. Substring with Concatenation of All Words - Hard

15. Find All Anagrams in a String - Medium

16. Shortest Subarray with Sum at Least K - Hard

17. Longest Continuous Subarray with Absolute Diff Less Than or Equal to Limit - Medium

18. Maximum Number of Vowels in a Substring of Given Length - Medium

19. Subarray Product Less Than K - Medium

20. Find All Anagrams in a String - Medium

21. Minimum Window Substring - Hard

22. Longest Substring Without Repeating Characters - Medium

23. Longest Repeating Character Replacement - Medium

24. Substring with Concatenation of All Words - Hard

25. Trapping Rain Water - Hard

26. Container With Most Water - Medium

27. Sort Colors - Medium

28. Find the Duplicate Number - Medium

29. Remove Duplicates from Sorted Array - Easy

30. Remove Element - Easy

10. Sliding Window

1. Maximum Sum Subarray of Size K - Easy

2. Longest Substring Without Repeating Characters - Medium

3. Minimum Window Substring - Hard

4. Find All Anagrams in a String - Medium

5. Longest Repeating Character Replacement - Medium

6. Maximum Number of Vowels in a Substring of Given Length - Medium

7. Substring with Concatenation of All Words - Hard

8. Permutations in String - Medium

9. Longest Subarray with Absolute Diff Less Than or Equal to Limit - Medium
10. Smallest Subarray with a Given Sum - Medium

11. Sliding Window Maximum - Hard

12. Maximum Average Subarray I - Easy

13. Maximum Average Subarray II - Hard

14. Number of Substrings with All Characters K - Hard

15. Count Number of Nice Subarrays - Medium

16. Longest Substring with At Most K Distinct Characters - Medium

17. Find the Maximum Sum of a Subarray of Size K - Easy

18. Sliding Window Maximum - Hard

19. Longest Repeating Character Replacement - Medium

20. Minimum Window Substring - Hard

21. Find All Anagrams in a String - Medium

22. Smallest Subarray with a Given Sum - Medium

23. Permutation in String - Medium

24. Longest Subarray with Absolute Diff Less Than or Equal to Limit - Medium

25. Count Number of Nice Subarrays - Medium

26. Longest Substring with At Most K Distinct Characters - Medium

27. Maximum Average Subarray I - Easy

28. Maximum Average Subarray II - Hard

29. Number of Substrings with All Characters K - Hard

30. Smallest Subarray with a Given Sum - Medium

Topological Sorting

1. Course Schedule - Medium

2. Course Schedule II - Medium

3. Alien Dictionary - Hard

4. Find Eventual Safe States - Medium

5. Longest Increasing Path in a Matrix - Hard

6. Network Delay Time - Medium

7. Reconstruct Itinerary - Medium


8. Minimum Height Trees - Medium

9. Critical Connections in a Network - Hard

10. Find the Smallest String Starting From Leaf - Medium

11. Find the Minimum in Rotated Sorted Array - Medium

12. Topological Sort - Medium

12. Union-Find

1. Number of Connected Components in an Undirected Graph - Medium

2. Accounts Merge - Medium

3. Redundant Connection - Medium

4. Friend Circles - Medium

5. Longest Consecutive Sequence - Medium

6. Graph Valid Tree - Medium

7. Number of Provinces - Medium

8. Is Graph Bipartite? - Medium

9. Minimum Spanning Tree - Hard

10. Kruskals Algorithm for Minimum Spanning Tree - Hard

Sorting

1. Easy

1. Sort Colors - Medium

2. Largest Number - Medium

3. Count of Smaller Numbers After Self - Hard

4. Wiggle Sort II - Medium

5. Sort List - Medium

6. Kth Largest Element in an Array - Medium

7. Kth Smallest Element in a Sorted Matrix - Medium

8. Find Median from Data Stream - Hard

9. Median of Two Sorted Arrays - Hard

10. Smallest Range Covering Elements from K Lists - Hard

2. Medium
1. Merge Intervals - Medium

2. Intervals Intersection - Medium

3. Insert Interval - Medium

4. Meeting Rooms II - Medium

5. Non-overlapping Intervals - Medium

6. Maximum Interval Overlap - Medium

7. Rearrange Array Elements by Sign - Medium

8. Find the Duplicate Number - Medium

9. Rearrange Words in a Sentence - Medium

10. Sort Array By Parity II - Easy

3. Hard

1. Merge k Sorted Lists - Hard

2. Sort an Array - Medium

3. Smallest Range Covering Elements from K Lists - Hard

4. Find Median from Data Stream - Hard

5. Median of Two Sorted Arrays - Hard

6. Count of Smaller Numbers After Self - Hard

7. Rearrange Array Elements by Sign - Medium

8. Smallest Range Covering Elements from K Lists - Hard

9. Largest Number - Medium

10. Wiggle Sort II - Medium

Stacks

1. Easy

1. Valid Parentheses - Easy

2. Min Stack - Easy

3. Evaluate Reverse Polish Notation - Medium

4. Implement Stack using Queues - Easy

5. Daily Temperatures - Medium

6. Next Greater Element I - Easy


7. Remove Duplicate Letters - Medium

8. Basic Calculator - Hard

9. Basic Calculator II - Medium

10. Decode String - Medium

2. Medium

1. Simplify Path - Medium

2. Largest Rectangle in Histogram - Hard

3. Trapping Rain Water - Hard

4. Asteroid Collision - Medium

5. Valid Parenthesis String - Medium

6. Daily Temperatures - Medium

7. Evaluate Reverse Polish Notation - Medium

8. Implement Queue using Stacks - Easy

9. Largest Rectangle in Histogram - Hard

10. Basic Calculator III - Hard

3. Hard

1. Largest Rectangle in Histogram - Hard

2. Trapping Rain Water - Hard

3. Basic Calculator III - Hard

4. Remove Duplicate Letters - Medium

5. Basic Calculator - Hard

6. Basic Calculator II - Medium

7. Simplify Path - Medium

8. Decode String - Medium

9. Remove Duplicate Letters - Medium

10. Evaluate Reverse Polish Notation - Medium

Queues

1. Easy

1. Implement Queue using Stacks - Easy


2. Move Zeroes - Easy

3. Flood Fill - Easy

4. Generate Parentheses - Medium

5. Binary Tree Level Order Traversal - Medium

6. Number of Islands - Medium

7. Perfect Squares - Medium

8. Design Circular Queue - Medium

9. Rotting Oranges - Medium

10. Find All Anagrams in a String - Medium

2. Medium

1. Design Circular Deque - Medium

2. Course Schedule - Medium

3. Course Schedule II - Medium

4. Binary Tree Level Order Traversal II - Medium

5. Top K Frequent Elements - Medium

6. Reconstruct Itinerary - Medium

7. Network Delay Time - Medium

8. Find All Anagrams in a String - Medium

9. Minimum Window Substring - Hard

10. Sliding Window Maximum - Hard

3. Hard

1. Sliding Window Maximum - Hard

2. Minimum Window Substring - Hard

3. Reconstruct Itinerary - Medium

4. Network Delay Time - Medium

5. Course Schedule II - Medium

6. Course Schedule - Medium

7. Design Circular Deque - Medium

8. Top K Frequent Elements - Medium


9. Binary Tree Level Order Traversal II - Medium

10. Find All Anagrams in a String - Medium

Recursion :

1. Easy

1. Fibonacci Number - Easy

2. Factorial Trailing Zeroes - Easy

3. Power of Two - Easy

4. Reverse String - Easy

5. Remove Duplicates from Sorted Array - Easy

6. Symmetric Tree - Easy

7. Path Sum - Easy

8. Climbing Stairs - Easy

9. Merge Two Sorted Lists - Easy

10. Single Number - Easy

2. Medium

1. Generate Parentheses - Medium

2. Combination Sum - Medium

3. Permutations - Medium

4. Letter Combinations of a Phone Number - Medium

5. Subsets - Medium

6. Word Search - Medium

7. Combinations - Medium

8. Unique Paths - Medium

9. Restore IP Addresses - Medium

10. Combination Sum II - Medium

3. Hard

1. N-Queens II - Hard

2. Sudoku Solver - Hard

3. Word Search II - Hard


4. Edit Distance - Hard

5. Palindrome Partitioning II - Hard

6. Decode Ways - Medium

7. Wildcard Matching - Hard

8. Regular Expression Matching - Hard

9. Maximum Product Subarray - Medium

10. Combination Sum II – Medium

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy