Software Engineering Interview Prep Guide
A structured collection of LeetCode problem walkthroughs, coding patterns, and system design concepts for SDE/SWE technical interviews at top tech companies.
What This Guide Covers
- LeetCode problem walkthroughs — step-by-step solutions with time/space complexity analysis
- Core data structures — arrays, linked lists, trees, graphs, heaps, hash maps
- Algorithm patterns — sliding window, two pointers, BFS/DFS, dynamic programming, binary search
- System design concepts — available via the System Design blog series
Recommended Study Order
Start with these foundational problems before tackling the harder ones:
- Arrays and hashing: Longest Consecutive Sequence
- Trees: Maximum Depth of Binary Tree → Same Tree → Level Order Traversal
- Dynamic programming: Pascal's Triangle → Triangle → Best Time to Buy and Sell Stock
- Graphs: Path Sum → Critical Connections
Related Blog Articles
- How to Ace the System Design Round
- What is Concurrent Programming?
- Understanding WebSockets
- Non-Blocking Design Patterns
- SQL OFFSET and Pagination
- SQL GROUP BY vs DISTINCT
Frequently Asked Questions
How many LeetCode problems do I need to solve to pass coding interviews? Most candidates recommend 75–150 problems covering all major patterns. Focus on understanding the pattern, not memorizing solutions — companies like FAANG test variations, not exact problems.
What coding patterns appear most often in interviews? The most common are: sliding window, two pointers, BFS/DFS on trees/graphs, dynamic programming (knapsack, LCS), binary search, and topological sort. Each pattern covers dozens of problems.
How long does it take to prepare for a coding interview? Most people need 2–4 months of consistent daily practice (1–2 hours/day) to feel prepared for mid-level SDE roles. Senior roles add system design preparation (another 4–6 weeks).
Do I need to know system design for SDE-1 interviews? It depends on the company. Most FAANG-equivalent companies include a light system design round even for SDE-1. Start with the basics: REST APIs, database indexing, caching, and load balancing.
Index of LeetCode Problems
- 100-SameTree
- 102-BinaryTreeLevelOrderTraversal
- 1048-LongestStringChain
- 104-MaximumDepthOfBinaryTree
- 1059-AllPathsFromSourceLeadToDestination
- 1074-NumberOfSubmatricesThatSumToTarget
- 108-ConvertSortedArrayToBinarySearchTree
- 1091-ShortestPathInBinaryMatrix
- 112-PathSum
- 1136-ParallelCourses
- 113-PathSumII
- 114-FlattenBinaryTreeToLinkedList
- 1151-MinimumSwapsToGroupAll1sTogether
- 117-PopulatingNextRightPointersInEachNode2
- 118-PascalsTriangle
- 1192-CriticalConnectionsInANetwork
- 1197-MinimumKnightMoves
- 120-Triangle
- 121-BestTimeToBuyAndSellStock
- 1229-MeetingScheduler
- 1268-SearchSuggestionsSystem
- 128-LongestConsecutiveSequence
- 1302-DeepestLeavesSum
- 1328-BreakAPalindrome
- 1329-SortTheMatrixDiagonally
- 1332-RemovePalindromicSubsequences
- 1338-ReduceArraySizeToTheHalf
- 1342-NumberOfStepsToReduceANumberToZero
- 1354-ConstructTargetArrayWithMultipleSums
- 135-Candy
- 1379-FindACorrespondingNodeOfABinaryTreeInACloneOfThatTree
- 1383-MaximumPerformanceOfATeam
- 13-RomanToInteger
- 1423-MaximumPointsYouCanObtainFromCards
- 142-LinkedListCycleII
- 1448-CountGoodNodesInBinaryTree
- 1457-Pseudo-PalindromicPathsInABinaryTree
- 1461-CheckIfAStringContainsAllBinaryCodesOfSizeK
- 1465-MaximumAreaOfAPieceOfCakeAfterHorizontalAndVerticalCuts
- 146-LRUCache
- 1480-RunningSumOf1dArray
- 1564-PutBoxesIntoTheWarehouseI
- 1578-MinimumTimeToMakeRopeColorful
- 160-IntersectionOfTwoLinkedLists
- 16-3SumClosest
- 1642-FurthestBuildingYouCanReach
- 1647-MinimumDeletionsToMakeCharacterFrequenciesUnique
- 1658-MinimumOperationsToReduceXToZero
- 167-TwoSumII
- 1680-ConcatenationOfConsecutiveBinaryNumbers
- 1695-MaximumErasureValue
- 1696-JumpGameVI
- 1710-MaximumUnitsOnATruck
- 1770-MaximumScoreFromPerformingMultiplicationOperations
- 188-BestTimeToBuyAndSellStockIV
- 191-NumberOf1Bits
- 1996-TheNumberOfWeakCharactersInTheGame
- 199-BinaryTreeRightSideView
- 19-RemoveNthNodeFromEndOfList
- 2007-FindOriginalArrayFromDoubledArray
- 200-NumberOfIslands
- 205-IsomorphicStrings
- 206-ReverseLinkedList
- 20-ValidParentheses
- 215-KthLargestElementInAnArray
- 218-TheSkylineProblem
- 21-MergeTwoSortedLists
- 234-PalindromeLinkedList
- 235-LowestCommonAncestorOfABinarySearchTree
- 236-LowestCommonAncestorOfABinaryTree
- 242-ValidAnagram
- 251-Flatten2DVector
- 256-PaintHouse
- 268-MissingNumber
- 277-FindTheCelebrity
- 278-FirstBadVersion
- 29-DivideTwoIntegers
- 2-AddTwoNumbers
- 300-LongestIncreasingSubsequence
- 304-RangeSumQuery2D-Immutable
- 307-RangeSumQuery-Mutable
- 314-BinaryTreeVerticalOrderTraversal
- 315-CountOfSmallerNumbersAfterSelf
- 318-MaximumProductOfWordLengths
- 322-CoinChange
- 326-PowerOfThree
- 329-LongestIncreasingPathInAMatrix
- 32-LongestValidParentheses
- 334-IncreasingTripletSubsequence
- 336-PalindromePairs
- 342-PowerOfFour
- 34-FindFirstAndLastPositionOfElementInSortedArray
- 354-RussianDollEnvelopes
- 363-MaxSumOfRectangleNoLargerThanK
- 366-FindLeavesOfBinaryTree
- 376-WiggleSubsequence
- 377-CombinationSumIV
- 378-KthSmallestElementInASortedMatrix
- 383-RansomNote
- 387-FirstUniqueCharacterInAString
- 393-UTF-8Validation
- 3-LongestSubstringWithoutRepeatingCharacters
- 406-QueueReconstructionByHeight
- 409-LongestPalindrome
- 417-PacificAtlanticWaterFlow
- 429-N-aryTreeLevelOrderTraversal
- 42-TrappingRainWater
- 462-MinimumMovesToEqualArrayElementsII
- 473-MatchsticksToSquare
- 474-OnesAndZeroes
- 484-FindPermutation
- 489-RobotRoomCleaner
- 48-RotateImage
- 509-FibonacciNumber
- 510-InorderSuccessorInBSTII
- 51-N-Queens
- 527-WordAbbreviation
- 52-N-QueensII
- 557-ReverseWordsInAStringIII
- 575-DistributeCandies
- 576-OutOfBoundaryPaths
- 589-NaryTreePreorderTraversal
- 5-LongestPalindromicSubstring
- 606-ConstructStringFromBinaryTree
- 609-FindDuplicateFileInSystem
- 623-AddOneRowToTree
- 629-KInversePairsArray
- 62-UniquePaths
- 630-CourseScheduleIII
- 637-AverageOfLevelsInBinaryTree
- 63-UniquePathsII
- 647-PalindromicSubstrings
- 653-TwoSumIV-InputIsABST
- 658-FindKClosestElements
- 659-SplitArrayIntoConsecutiveSubsequences
- 665-NonDecreasingArray
- 694-NumberOfDistinctIslands
- 695-MaxAreaOfIsland
- 704-BinarySearch
- 718-MaximumLengthOfRepeatedSubarray
- 724-FindPivotIndex
- 729-MyCalendarI
- 732-MyCalendarIII
- 733-FloodFill
- 743-NetworkDelayTime
- 745-PrefixAndSuffixSearch
- 746-MinCostClimbingStairs
- 792-NumberOfMatchingSubsequences
- 804-UniqueMorseCodeWords
- 814-BinaryTreePruning
- 820-ShortEncodingOfWords
- 823-BinaryTreesWithFactors
- 838-PushDominoes
- 844-BackspaceStringCompare
- 867-TransposeMatrix
- 869-ReorderedPowerOf2
- 86-PartitionList
- 871-MinimumNumberOfRefuelingStops
- 876-MiddleOfTheLinkedList
- 88-MergeSortedArray
- 890-FindAndReplacePattern
- 916-WordSubsets
- 936-StampingTheSequence
- 948-BagOfTokens
- 94-BinaryTreeInorderTraversal
- 967-NumbersWithSameConsecutiveDifferences
- 968-BinaryTreeCameras
- 97-InterleavingString
- 981-TimeBasedKey-ValueStore
- 985-SumOfEvenNumbersAfterQueries
- 987-VerticalOrderTraversalOfABinaryTree
- 98-ValidateBinarySearchTree
- 990-SatisfiabilityOfEqualityEquations
- IsSubsequence