leetcode_gym/pages/lists/reviewProblems.md

205 lines
6.4 KiB
Markdown
Raw Permalink Normal View History

---
layout: page
title: Review Problems
---
Let this be the list that you go thru for your review right before an upcoming interview. These problems provide the most bang for your buck.
It is sorted by category. This list will continually change as your skill level progresses.
#### Arrays (Two Pointers/Sliding Window)
- [Sort Colors](/problems/sortColors)
- [Water with Most Water](/problems/waterWithMostWater)
- [Intersection of Two Arrays](/problems/intersectionOfTwoArrays2)
- [Move Zeros](/problems/moveZeros)
- [Remove Duplicates From Sorted Array](/problems/removeDupFromSortedArray)
- [Three Sum](/problems/threeSum)
#### HashTables
- [Two Sum](/problems/twoSum)
- [Group Isomorphic Strings](/problems/groupIsomorphicStrings)
- [Isomorphic Strings](/problems/isomorphicStrings)
#### Stacks
Need more practice with stacks, don't assume they're easy
- [Minimum Add to Make Parentheses Valid](/problems/minimumAddToMakeValidParenthesis)
- [Valid Parenthesis]()
#### Heap
Whenever problem asks for kth largest or kth smallest. Think heap.
- [Kth Largest Element in an Array](/problems/kthlargestElementInAnArray)
- [Kth Largest Element in a Stream](/problems/kthlargestElementInAStream)
- [Top Frequent K Elements](/problems/topFrequentKElements)
#### Strings
- [Longest Common Prefix](/problems/longestCommonPrefix)
- [Longest Substring without Repeating Characters](/problems/longestSubstringWithoutRepeatingChars)
- [Reverse Vowels from a String](/problems/reverseVowelsFromAString)
- [Is Subsequence](/problems/isSubSequence)
- [Longest Palindromic Substring](/problems/longestPalindromicSubstring)
- [implement strstr](implement_strstr)
#### Math
- Reverse Integer
#### Trees
- [Deepest Leaves Sum BFS](/problems/deepestLeavesSumBFS)
- [Deepest Leaves Sum DFS](/problems/deepestLeavesSumDFS)
- [Validate BST](/problems/validateBST)
- [LCA Binary Tree (No parent pointers)](/problems/lcaBinaryTree)
- Easy Tree Problems
- [Max Depth](/problems/maxDepth)
- [Is Tree Balanced](/problems/isTreeBalanced)
- [Is Same Tree](/problems/isSameTree)
- [Is Symmetric Tree?](/problems/isSymmetricTree)
- [Is Sub Tree](/problems/isSubtree)
- [Invert/Reverse Tree](/problems/invertTree)
#### Path Sums
- [Path Sum](/problems/pathSum)
- [Path Sum 2](/problems/pathSum2)
- [Path Sum 3](/problems/pathSum3)
#### BFS (Trees)
- [Binary Tree Zig Zag](/problems/binaryTreeZigZag)
- [Cousins in Binary Tree](/problems/cousinsInBinaryTree)
#### DFS (Trees)
- [Binary Tree Zig Zag](/problems/binaryTreeZigZagDfs)
#### Binary Search
Need to get way better at identifying and applying these.
[Leetcode List](https://leetcode.com/tag/binary-search/)
- [Binary Search](/problems/binarySearch)
- [Guess Number Higher or Lower](/problems/guessNumberHigherOrLower)
- [Find First and Last Position of Element in Sorted Array](/problems/searchForARange)
- [Search Matrix](/problems/matrixSearch)
- [Find Min in Sorted Array](/problems/findMinInSortedArray)
- [Search in rotated array](/problems/searchInRotatedSortedArray)
- [Search Rotated Array](/problems/searchRotatedArray)
- [Arrange Coins](/problems/arrangeCoins)
#### Bit Manipulation
- [Missing Number](/problems/missingNumber)
- [Single Number](/problems/singleNumber)
- [Reverse Bits](/problems/reverseBits)
- [Power(x,n)](/problems/powx-n)
#### Interval
- [Merge Interval](/problems/mergeIntervals)
### Linked List
Need to practice these. Keep messing up on edge cases. Learn when to use techniques like dummy nodes and prev pointers.
Linked List Advice found [here](https://leetcode.com/explore/learn/card/linked-list/214/two-pointer-technique/1216/)
- [Merge Sorted Lists](/problems/mergeSortedLLiter)
- [Remove Nth Node from End of List](/problems/removeNthNodeFromEndOfList)
- [Remove Linked List Elements](/problems/removeLinkedListElements)
- [Reverse Linked List](/problems/reverseLLiterative)
- Cycle Detection
- [Linked List Cycle I](/problems/llcycle)
- [Linked List Cycle II](/problems/llcycle2)
- [Find the Duplicate number](/problems/findTheDuplicateNumber)
- [Flatten Mutlilevel LInked List](/problems/flattenMultilevelDoublyLinkedList)
- [Reorder List - list reversal and merge as subproblems](/problems/reorder_list)
#### Matrix
- [Rotate Image](/problems/rotateImage)
- [Validate Sudoku](/problems/validateSudoku)
- [Spiral Matrix](/problems/spiralMatrix)
#### Dynamic Programming
Can only solve these if seen before
- [Longest Common Subsequence](/problems/longestCommonSubsequence)
- [Unique Paths](/problems/uniquePaths)
- [Coin Change](/problems/coinChange)
- [Coin Change 2](/problems/coinChange2)
- Perfect Squares
- [Unique BST](/problems/uniqueBST)
- Easy
- [Buy and sell stock i](/problems/buyAndSellStock)
- [Buy and sell stock 2](/problems/buyAndSellStock2)
- [House robber 1](/problems/houseRobber)
- [House robber 12](/problems/houseRobber2)
- [max subarray](/problems/maxSubarray)
- [max product subarray](/problems/maxProductSubarray)
#### Recursion / Backtracking
Solvable with backtracking template. Need to articulate them better.
- [Permutation](/problems/permutations)
- [Permutation (cascading)](/problems/permutationsCascading)
- [Subsets](/problems/subsets)
- [Subsets (cascading)](/problems/subsetsCascading)
- [Generate Parenthesis](/problems/generateParanthesis)
- [Combination Sum](/problems/combination_sum)
- [Combination Sum II](/problems/combinationSum2)
- [Combination Sum III](/problems/combinationSum3)
[Check this link for combo sum 1,2,3 using add/pop method](https://leetcode.com/problems/combination-sum-ii/discuss/16878/Combination-Sum-I-II-and-III-Java-solution-(see-the-similarities-yourself))
#### Islands
Okay at solving these. Just need to remember pattern.
- [Flood Fill](/problems/floodfill)
- [Num Islands](/problems/numIslands)
- [Max Area Of Islands](/problems/maxAreaOfIsland)
- [Rotten Oranges](/problems/rottenOranges)
- [Surrounded Region](/problems/surroundedRegion)
- [Word Search](/problems/wordSearch)
- [Island Perimeter](/problems/islandPerimeter)
#### Graphs (Dijkstra)
Just learning these. Do more of these problems to find patterns.
- [All Paths Fro Source to Target](/problems/allPathsFromSourceToTarget)
- Cheapest Flights
- Network Delay Times
- Reconstruct Iteranary
#### Greedy
Just learning these. Do more of these problems to find patterns.
- [Queue Reconstruction By Height](/problems/queueReconstructionByHeight)
- [Jump Game](/problems/jumpGame)