Coding interview questions
The problems below come up again and again in big-tech style coding rounds. Each page says what the interviewer is really checking, how to talk through a strong answer, and where candidates usually slip. Reading is half of it: the other half is solving it out loud while someone asks why.
Preparing for this round? Read how to prepare for a coding interview: a four-week DSA plan.
Two Sum
How to answer Two Sum in a coding interview: the hash map approach, what interviewers listen for, the mistakes that cost offers and the sorted-input follow-up.
Design an LRU Cache
How to implement an LRU cache in an interview with O(1) get and put: hash map plus doubly linked list, what interviewers check, common bugs and the thread-safety follow-up.
Merge Intervals
How to solve Merge Intervals in a coding interview: sort by start, sweep once, the touching-interval edge case and the streaming follow-up interviewers like to ask.
Valid Parentheses
How to answer Valid Parentheses in a coding interview: the stack approach, the three ways a bracket string can be invalid, and what interviewers check in your code.
Longest Substring Without Repeating Characters
How to solve the longest substring without repeating characters in an interview: the sliding window, jumping the left pointer, and the off-by-one bugs to avoid.
Top K Frequent Words
How to answer Top K Frequent Words in an interview: count with a hash map, choose between sorting, a size-k heap and buckets, and handle alphabetical tie-breaks.
Number of Islands
How to solve Number of Islands in a coding interview with DFS, BFS or union-find, what interviewers check about grid traversal, and the huge-grid follow-up.
Course Schedule
How to answer Course Schedule in an interview: model prerequisites as a graph, use Kahn's algorithm or DFS colouring, and detect cycles cleanly.
Coin Change
How to answer Coin Change in a coding interview: why greedy fails, the bottom-up DP table, the impossible case, and the count-the-ways follow-up.
Trapping Rain Water
How to answer Trapping Rain Water in an interview: the prefix-max idea, the O(1) space two-pointer solution and how to explain why it is correct.
Group Anagrams
How to answer Group Anagrams in an interview: choose a canonical key (sorted letters or letter counts), group with a hash map, and compare the costs.
Search in Rotated Sorted Array
How to search a rotated sorted array in O(log n) in a coding interview: find the sorted half, decide which side holds the target, and avoid the classic off-by-ones.
Find Median from Data Stream
How to answer the running median question in an interview: a max-heap and a min-heap kept balanced, the invariants to state, and follow-ups on windows and ranges.
Word Break
How to solve Word Break in a coding interview: why plain recursion explodes, the boolean DP over prefixes, and how to speed up the dictionary lookups.
Coding round: practice it out loud
Max picks a question at your level, asks follow-ups the way a real interviewer would, and scores you skill by skill when the time is up.
Practice with MaxFree: a 5-minute voice round and unlimited typed drills, with scored feedback. No card, and your camera is never recorded.