/leetcode-75

Ace Coding Interview with 75 Qs

Primary LanguageKotlinApache License 2.0Apache-2.0

LeetCode 75

LeetCode 75

Ace Coding Interview with 75 Qs

Summary

  • 75 Essential & Trending Problems
  • Must-do problem list for interview prep
  • Best for 1~3 month of prep time

Solutions

Problem Difficulty Tags
Array / String
Merge Strings Alternately Easy # 1768, Two Pointers, String
Greatest Common Divisor of Strings Easy # 1071, Math, String
Kids With the Greatest Number of Candies Easy # 1431, Array
Can Place Flowers Easy # 605, Array, Greedy
Reverse Vowels of a String Easy # 345, Two Pointers, String
Reverse Words in a String Medium # 151, Two Pointers, String
Product of Array Except Self Medium # 238, Array, Prefix Sum
Increasing Triplet Subsequence Medium # 334, Array, Greedy
String Compression Medium # 443, Two Pointers, String
Two Pointers
Move Zeroes Easy # 283, Array, Two Pointers
Is Subsequence Easy # 392, Two Pointers, String, Dynamic Programming
Container With Most Water Medium # 11, Array, Two Pointers, Greedy
Max Number of K-Sum Pairs Medium # 1679, Array, Hash Table, Two Pointers, Sorting
Sliding Window
Maximum Average Subarray I Easy # 643, Array, Sliding Window
Maximum Number of Vowels in a Substring of Given Length Medium # 1456, String, Sliding Window
Max Consecutive Ones III Medium # 1004, Array, Binary Search, Sliding Window, Prefix Sum
Longest Subarray of 1's After Deleting One Element Medium # 1493, Array, Dynamic Programming, Sliding Window
Prefix Sum
Find the Highest Altitude Easy # 1732, Array, Prefix Sum
Find Pivot Index Easy # 724, Array, Prefix Sum
Hash Map / Set
Find the Difference of Two Arrays Easy # 2215, Array, Hash Table
Unique Number of Occurrences Easy # 1207, Array, Hash Table
Determine if Two Strings Are Close Medium # 1657, Hash Table, String, Sorting, Counting
Equal Row and Column Pairs Medium # 2352, Array, Hash Table, Matrix, Simulation
Stack
Removing Stars From a String Medium # 2390, String, Stack, Simulation
Asteroid Collision Medium # 735, Array, Stack, Simulation
Decode String Medium # 394, String, Stack, Recursion
Queue
Number of Recent Calls Easy # 933, Design, Queue, Data Stream
Dota2 Senate Medium # 649, String, Greedy, Queue
Linked List
Delete the Middle Node of a Linked List Medium # 2095, Linked List, Two Pointers
Odd Even Linked List Medium # 328, Linked List
Reverse Linked List Easy # 206, Linked List, Recursion
Maximum Twin Sum of a Linked List Medium # 2130, Linked List, Two Pointers, Stack
Binary Tree - DFS
Maximum Depth of Binary Tree Easy # 104, Tree, Depth-First Search, Breadth-First Search, Binary Tree
Leaf-Similar Trees Easy # 872, Tree, Depth-First Search, Binary Tree
Count Good Nodes in Binary Tree Medium # 1448, Tree, Depth-First Search, Breadth-First Search, Binary Tree
Path Sum III Medium # 437, Tree, Depth-First Search, Binary Tree
Longest ZigZag Path in a Binary Tree Medium # 1372, Dynamic Programming, Tree, Depth-First Search, Binary Tree
Lowest Common Ancestor of a Binary Tree Medium # 236, Tree, Depth-First Search, Binary Tree
Binary Tree - BFS
Binary Tree Right Side View Medium # 199, Tree, Depth-First Search, Breadth-First Search, Binary Tree
Maximum Level Sum of a Binary Tree Medium # 1161, Tree, Depth-First Search, Breadth-First Search, Binary Tree
Binary Search Tree
Search in a Binary Search Tree Easy # 700, Tree, Binary Search Tree, Binary Tree
Delete Node in a BST Medium # 450, Tree, Binary Search Tree, Binary Tree
Graphs - DFS
Keys and Rooms Medium # 841, Depth-First Search, Breadth-First Search, Graph
Number of Provinces Medium # 547, Depth-First Search, Breadth-First Search, Union Find, Graph
Reorder Routes to Make All Paths Lead to the City Zero Medium # 1466, Depth-First Search, Breadth-First Search, Graph
Evaluate Division Medium # 399, Array, Depth-First Search, Breadth-First Search, Union Find, Graph, Shortest Path
Graphs - BFS
Nearest Exit from Entrance in Maze Medium # 1926, Array, Breadth-First Search, Matrix
Rotting Oranges Medium # 994, Array, Breadth-First Search, Matrix
Heap / Priority Queue
Kth Largest Element in an Array Medium # 215, Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
Smallest Number in Infinite Set Medium # 2336, Hash Table, Design, Heap (Priority Queue)
Maximum Subsequence Score Medium # 2542, Array, Greedy, Sorting, Heap (Priority Queue)
Total Cost to Hire K Workers Medium # 2462, Array, Two Pointers, Heap (Priority Queue), Simulation
Binary Search
Guess Number Higher or Lower Easy # 374, Binary Search, Interactive
Successful Pairs of Spells and Potions Medium # 2300, Array, Two Pointers, Binary Search, Sorting
Find Peak Element Medium # 162, Array, Binary Search
Koko Eating Bananas Medium # 875, Array, Binary Search
Backtracking
Letter Combinations of a Phone Number Medium # 17, Hash Table, String, Backtracking
Combination Sum III Medium # 216, Array, Backtracking
DP - 1D
N-th Tribonacci Number Easy # 1137, Math, Dynamic Programming, Memoization
Min Cost Climbing Stairs Easy # 746, Array, Dynamic Programming
House Robber Medium # 198, Array, Dynamic Programming
Domino and Tromino Tiling Medium # 790, Dynamic Programming
DP - Multidimensional
Unique Paths Medium # 62, Math, Dynamic Programming, Combinatorics
Longest Common Subsequence Medium # 1143, String, Dynamic Programming
Best Time to Buy and Sell Stock with Transaction Fee Medium # 714, Array, Dynamic Programming, Greedy
Edit Distance Medium # 72, String, Dynamic Programming
Bit Manipulation
Counting Bits Easy # 338, Dynamic Programming, Bit Manipulation
Single Number Easy # 136, Array, Bit Manipulation
Minimum Flips to Make a OR b Equal to c Medium # 1318, Bit Manipulation
Trie
Implement Trie (Prefix Tree) Medium # 208, Hash Table, String, Design, Trie
Search Suggestions System Medium # 1268, Array, String, Binary Search, Trie, Sorting, Heap (Prefix Tree)
Intervals
Non-overlapping Intervals Medium # 435, Array, Dynamic Programming, Greedy, Sorting
Minimum Number of Arrows to Burst Balloons Medium # 452, Array, Greedy, Sorting
Monotonic Stack
Daily Temperatures Medium # 739, Array, Stack, Monotonic Stack
Online Stock Span Medium # 901, Stack, Design, Monotonic Stack, Data Stream