Interview
DSA for frontend engineers
Pattern-first problems with brute force, optimized approaches, complexity, and company tags. JavaScript and TypeScript solutions.
Categories
- Arrays
- Strings
- HashMaps
- Linked List
- Stack
- Queue
- Heap
- Tree
- Trie
- Graph
- Binary Search
- Sliding Window
- Dynamic Programming
- Greedy
- Backtracking
Problems
Two Sum
beginnerThe classic warm-up: find two indices that add to a target — brute force, hash map, and the follow-ups interviewers love.
beginner · Google · Amazon · Meta
Contains Duplicate
beginnerContains Duplicate explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Valid Anagram
beginnerValid Anagram explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Group Anagrams
intermediateGroup Anagrams explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Top K Frequent Elements
intermediateTop K Frequent Elements explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Product of Array Except Self
intermediateProduct of Array Except Self explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Longest Consecutive Sequence
intermediateLongest Consecutive Sequence explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Valid Palindrome
beginnerValid Palindrome explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
3Sum
intermediate3Sum explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Container With Most Water
intermediateContainer With Most Water explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Best Time to Buy and Sell Stock
beginnerBest Time to Buy and Sell Stock explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Longest Substring Without Repeating
intermediateLongest Substring Without Repeating explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Longest Repeating Character Replacement
intermediateLongest Repeating Character Replacement explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Minimum Window Substring
advancedMinimum Window Substring explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Valid Parentheses
beginnerValid Parentheses explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Min Stack
intermediateMin Stack explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Evaluate Reverse Polish Notation
intermediateEvaluate Reverse Polish Notation explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Daily Temperatures
intermediateDaily Temperatures explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Car Fleet
intermediateCar Fleet explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Binary Search
beginnerBinary Search explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Search in Rotated Sorted Array
intermediateSearch in Rotated Sorted Array explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Find Minimum in Rotated Sorted Array
intermediateFind Minimum in Rotated Sorted Array explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Time Based Key Value Store
intermediateTime Based Key Value Store explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Reverse Linked List
beginnerReverse Linked List explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Merge Two Sorted Lists
beginnerMerge Two Sorted Lists explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Linked List Cycle
beginnerLinked List Cycle explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Reorder List
intermediateReorder List explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Remove Nth Node From End
intermediateRemove Nth Node From End explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Copy List with Random Pointer
intermediateCopy List with Random Pointer explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Add Two Numbers Linked List
intermediateAdd Two Numbers Linked List explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Find Duplicate Number
intermediateFind Duplicate Number explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
LRU Cache
advancedLRU Cache explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Implement Trie
intermediateImplement Trie explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Design Add and Search Words
intermediateDesign Add and Search Words explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Word Search II
advancedWord Search II explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
Number of Islands
intermediateNumber of Islands explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Clone Graph
intermediateClone Graph explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Max Area of Island
intermediateMax Area of Island explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Pacific Atlantic Water Flow
advancedPacific Atlantic Water Flow explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Course Schedule
intermediateCourse Schedule explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Course Schedule II
intermediateCourse Schedule II explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Redundant Connection
intermediateRedundant Connection explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Word Ladder
advancedWord Ladder explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
Climbing Stairs
beginnerClimbing Stairs explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
House Robber
intermediateHouse Robber explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
House Robber II
intermediateHouse Robber II explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Longest Palindromic Substring
intermediateLongest Palindromic Substring explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Coin Change
intermediateCoin Change explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Word Break
intermediateWord Break explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Longest Increasing Subsequence
intermediateLongest Increasing Subsequence explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Unique Paths
intermediateUnique Paths explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Jump Game
intermediateJump Game explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Jump Game II
intermediateJump Game II explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Gas Station
intermediateGas Station explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Hand of Straights
intermediateHand of Straights explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Merge Intervals
intermediateMerge Intervals explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Insert Interval
intermediateInsert Interval explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Non-overlapping Intervals
intermediateNon-overlapping Intervals explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Meeting Rooms
beginnerMeeting Rooms explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Meeting Rooms II
intermediateMeeting Rooms II explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Reverse Bits
beginnerReverse Bits explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Number of 1 Bits
beginnerNumber of 1 Bits explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Counting Bits
intermediateCounting Bits explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Missing Number
beginnerMissing Number explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Sum of Two Integers
intermediateSum of Two Integers explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Invert Binary Tree
beginnerInvert Binary Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Maximum Depth of Binary Tree
beginnerMaximum Depth of Binary Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Same Tree
beginnerSame Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Subtree of Another Tree
beginnerSubtree of Another Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta · Amazon
Lowest Common Ancestor BST
intermediateLowest Common Ancestor BST explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Binary Tree Level Order
intermediateBinary Tree Level Order explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Validate Binary Search Tree
intermediateValidate Binary Search Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Kth Smallest in BST
intermediateKth Smallest in BST explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Construct Tree from Preorder Inorder
advancedConstruct Tree from Preorder Inorder explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Binary Tree Max Path Sum
advancedBinary Tree Max Path Sum explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Serialize Deserialize Binary Tree
advancedSerialize Deserialize Binary Tree explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta
Implement Queue with Stacks
beginnerImplement Queue with Stacks explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Implement Stack with Queues
beginnerImplement Stack with Queues explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
beginner · Google · Meta
Sliding Window Maximum
advancedSliding Window Maximum explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
Find Median from Data Stream
advancedFind Median from Data Stream explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
K Closest Points to Origin
intermediateK Closest Points to Origin explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Task Scheduler
intermediateTask Scheduler explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Design Twitter Lite
advancedDesign Twitter Lite explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
Encode and Decode Strings
intermediateEncode and Decode Strings explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Valid Sudoku
intermediateValid Sudoku explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Spiral Matrix
intermediateSpiral Matrix explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Rotate Image
intermediateRotate Image explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Set Matrix Zeroes
intermediateSet Matrix Zeroes explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Word Search
intermediateWord Search explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Subsets
intermediateSubsets explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Combination Sum
intermediateCombination Sum explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
Permutations
intermediatePermutations explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta
N-Queens
advancedN-Queens explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
advanced · Google · Meta · Amazon
Palindrome Partitioning
intermediatePalindrome Partitioning explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon
Letter Combinations Phone Number
intermediateLetter Combinations Phone Number explained for frontend engineers — mental model, examples, common mistakes, and interview tips.
intermediate · Google · Meta · Amazon