Coding interview problems
Coding interview problems, solved
In the coding round an interviewer watches you get from a blank editor to working code, out loud, under a clock. Start with the ones interviewers open with.
The ones they ask first
Pass the coding round
Solve them yourself in the 14-day free trial. The learning engine brings every problem back before you forget it, so the patterns are still yours on interview day.
Be ready for whatever they ask
- Contains Duplicate
- Ransom Note
- Valid Anagram
- Missing Number
- Number of 1 Bits
- Binary Search
- Longest Palindrome
- Valid Palindrome
- Maximum Depth of Binary Tree
- Move Zeroes
- Middle of the Linked List
- Best Time to Buy and Sell Stock
- Climbing Stairs
- Invert Binary Tree
- Meeting Rooms
- Same Tree
- Add Binary
- First Bad Version
- Reverse Bits
- Counting Bits
- Path Sum
- Implement Queue using Stacks
- Majority Element
- Reverse Linked List
- Flood Fill
- Group Anagrams
- Balanced Binary Tree
- Letter Combinations of a Phone Number
- Merge Two Sorted Lists
- Min Stack
- Paint House
- Evaluate Reverse Polish Notation
- Encode and Decode Strings
- Linked List Cycle
- Subtree of Another Tree
- Binary Tree Tilt
- Jump Game
- K Closest Points to Origin
- Number of Connected Components in an Undirected Graph
- Number of Islands
- Remove Nth Node From End of List
- Swap Nodes in Pairs
- Unique Paths
- Binary Tree Level Order Traversal
- Lowest Common Ancestor of a Binary Search Tree
- Binary Tree Zigzag Level Order Traversal
- Find All Anagrams in a String
- Kth Smallest Element in a BST
- Maximum Points You Can Obtain from Cards
- Merge Intervals
- Rotate Image
- String to Integer (atoi)
- Subsets
- Insert Interval
- Partition Labels
- Top K Frequent Elements
- Binary Tree Right Side View
- Diameter of Binary Tree
- House Robber
- Kth Largest Element in an Array
- Palindrome Linked List
- Permutations
- Spiral Matrix
- Generate Parentheses
- Maximum Subarray
- Time Based Key-Value Store
- Daily Temperatures
- Palindromic Substrings
- Root-to-Leaf Sum Paths
- Sort Colors
- Validate Binary Search Tree
- Find Minimum in Rotated Sorted Array
- Implement Trie (Prefix Tree)
- Product of Array Except Self
- Surrounded Regions
- Koko Eating Bananas
- Longest Substring Without Repeating Characters
- Rotting Oranges
- Subarray Sum Equals K
- Decode String
- Graph Valid Tree
- Longest Consecutive Sequence
- Set Matrix Zeroes
- Valid Triangle Number
- Gas Station
- Word Search
- Clone Graph
- Combination Sum
- Container With Most Water
- Find the City With the Smallest Number of Neighbors at a Threshold Distance
- House Robber II
- Longest Increasing Subsequence
- Longest Palindromic Substring
- Maximum Sum of Distinct Subarrays With Length K
- Palindrome Partitioning
- Longest Common Subsequence
- Maximal Square
- Meeting Rooms II
- Minimum Knight Moves
- 01 Matrix
- Capacity to Ship Packages Within D Days
- Course Schedule
- Jump Game II
- Non-overlapping Intervals
- Search in Rotated Sorted Array
- Word Break
- Decode Ways
- Lowest Common Ancestor of a Binary Tree
- Design Add and Search Words Data Structure
- Merge K Sorted Lists
- Network Delay Time
- Task Scheduler
- Coin Change
- Find K Closest Elements
- Kth Smallest Element in a Sorted Matrix
- Maximum Product Subarray
- Accounts Merge
- Construct Binary Tree from Preorder and Inorder Traversal
- Course Schedule II
- Longest Univalue Path
- Maximum Width of Binary Tree
- Pacific Atlantic Water Flow
- Partition Equal Subset Sum
- Reorder List
- Sum of Two Integers
- Cheapest Flights Within K Stops
- LRU Cache
- Longest Repeating Character Replacement
- Minimum Height Trees
- Path With Minimum Effort
- Bus Routes
- Find Median from Data Stream
- Employee Free Time
- Minimum Falling Path Sum II
- N-Queens
- Serialize and Deserialize Binary Tree
- Alien Dictionary
- Word Ladder
- Trapping Rain Water
- Maximum Profit in Job Scheduling
- Split Array Largest Sum
- Word Search II
- Basic Calculator
- Binary Tree Maximum Path Sum
- Minimum Window Substring
- Minimum Window Subsequence
- Longest Valid Parentheses
- Largest Rectangle in Histogram
Walk into the coding round ready
Practice 1,500+ real interview questions, built by former Meta, X and LinkedIn engineers. 50,000+ engineers have prepared with Firecode.
50,000+engineers preparing with Firecode
1500+real interview questions from top tech companies
14languages, from Python to Rust
FAANG+offers landed at Google, Meta, Netflix, and more