Vercel Coding Interview Questions
100 Vercel coding interview problems with full optimal solutions — 30 easy, 64 medium, 6 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Vercel interviewer values, and a FAQ section.
Showing 37 problems of 100
- #1easyfrequently asked
1. Two Sum
Given an array of integers and a target, return the indices of two numbers that add up to the target. Vercel asks this as a warm-up to test whether you reach for a hash map instinctively when you see a 'find a pair' problem in their edge-routing or cache-key dedup contexts.
- #2easyfrequently asked
2. Valid Parentheses
Given a string of brackets, decide if it's balanced. Vercel uses this to test whether you recognize the stack pattern instantly — it's the same shape as their route-segment matching in nested layout trees.
- #3easyfrequently asked
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list by splicing nodes together. Vercel asks this as the building block of their log-merge sub-question for edge-function telemetry — same pattern as merging sorted per-region access logs.
- #12easyfrequently asked
12. Maximum Depth of Binary Tree
Given a binary tree, return its maximum depth. Vercel asks this to confirm you can do the 'max + 1' recursive pattern — the same trick they use to compute the longest deployment dependency chain.
- #16easyfrequently asked
16. Best Time to Buy and Sell Stock
Given an array of stock prices, find the max profit from a single buy-then-sell. Vercel asks this because the 'track min so far' pattern is identical to how their edge analytics finds the cheapest-cost path over a time-series of latencies.
- #19easyfrequently asked
19. Linked List Cycle
Given a linked list, determine whether it has a cycle. Vercel asks this because Floyd's tortoise-and-hare is the gateway to a class of pointer-pacing tricks they use in their request-pipeline scheduler.
- #29easyfrequently asked
29. Reverse Linked List
Reverse a singly linked list in-place. Vercel asks this constantly because it's the building block of every list-manipulation problem they care about — and because they want to see if you can do both iterative and recursive cleanly.
- #30easyfrequently asked
30. Contains Duplicate
Given an array, return true if any element appears more than once. Vercel asks this as the simplest set-based question; it's the warm-up before they pivot to streaming dedup or cache-key collisions.
- #31mediumfrequently asked
31. Add Two Numbers
Add two numbers represented as linked lists with digits in reverse order. Vercel asks this for the carry-propagation pattern across two cursors — the same shape they use when merging deltas from two edge nodes that drifted out of sync.
- #32mediumfrequently asked
32. Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters. Vercel asks this as their canonical sliding-window question — the same shape they use to find the longest run of unique cache-keys before invalidation.
- #34mediumfrequently asked
34. Container With Most Water
Given a set of vertical lines, find the two that hold the most water between them. Vercel asks this for the two-pointer optimization — and because the 'always move the shorter side' invariant is the same shape as their bandwidth-allocation greedy.
- #35mediumfrequently asked
35. 3Sum
Given an array, return all unique triplets that sum to zero. Vercel asks this for the sort + two-pointer pattern and the dedup logic — both classic interview tests of attention to detail.
- #37mediumfrequently asked
37. Remove Nth Node From End of List
Remove the nth node from the end of a linked list in one pass. Vercel asks this for the two-pointer offset trick — same pattern as their 'replay last N events' streaming primitive.
- #38mediumfrequently asked
38. Generate Parentheses
Generate all combinations of n pairs of well-formed parentheses. Vercel asks this for the constrained-backtracking pattern — same shape as enumerating valid nested route configurations under their layout-tree rules.
- #41mediumfrequently asked
41. Search in Rotated Sorted Array
Search for a target in a rotated sorted array in O(log n). Vercel asks this for the binary-search-with-rotation reasoning — same shape as their consistent-hashing key lookup when the ring has been shifted.
- #45mediumfrequently asked
45. Permutations
Generate all permutations of a distinct-integer array. Vercel asks this as the canonical backtracking question — same recursive shape as enumerating valid edge-routing orderings for their A/B traffic-split experiments.
- #47mediumfrequently asked
47. Group Anagrams
Group strings that are anagrams of each other. Vercel asks this for the canonical-key + hash-map pattern — same shape as dedup in their build cache where alphabetically reordered dependency arrays should hash to the same key.
- #49mediumfrequently asked
49. Jump Game
Given an array of max-jump lengths from each index, decide if you can reach the last index. Vercel asks this for the greedy 'max reachable so far' pattern — same shape as their step-by-step deploy-graph reachability checks.
- #50mediumfrequently asked
50. Merge Intervals
Merge overlapping intervals. Vercel asks this for the sort-then-sweep pattern — the same shape as their cache-invalidation merging (overlapping TTL windows collapse into a single invalidation pass).
- #53mediumfrequently asked
53. Simplify Path
Given an absolute Unix file path, simplify it (canonical form). Vercel asks this directly — they literally need this logic in their edge router for canonicalizing URL paths and resolving `..` segments.
- #59mediumfrequently asked
59. Word Search
Given a 2D board of letters and a word, return whether the word exists by adjacent-cell traversal. Vercel asks this for the DFS-with-visited-marker pattern — same shape as their route-prefix matching across the layout tree.
- #68mediumfrequently asked
68. Validate Binary Search Tree
Determine if a binary tree is a valid BST. Vercel asks this for the min/max bounds propagation pattern — same recursive shape they use to validate that nested route configurations satisfy ancestor constraints.
- #69mediumfrequently asked
69. Binary Tree Level Order Traversal
Return the level-order (BFS) traversal of a binary tree, grouped by level. Vercel asks this for the level-tracking BFS pattern — same shape as their dependency-graph layer expansion for parallel builds.
- #75mediumfrequently asked
75. Longest Consecutive Sequence
Find the length of the longest consecutive elements sequence in an unsorted array, in O(n). Vercel asks this for the hash-set 'only start from the run boundary' insight — same trick they use to find longest contiguous deploy intervals.
- #77mediumfrequently asked
77. Copy List with Random Pointer
Deep-copy a linked list where each node has both .next and a .random pointer. Vercel asks this for the interleaving trick that achieves O(1) extra space — the kind of pointer-arithmetic discipline they need in their runtime.
- #78mediumfrequently asked
78. Word Break
Given a string and a dictionary, return whether the string can be segmented into space-separated dictionary words. Vercel asks this for the 1D DP with backward dependency — same shape as their incremental URL-path segmentation logic.
- #79mediumfrequently asked
79. LRU Cache
Design a Least-Recently-Used cache with O(1) get and put. Vercel asks this constantly — they literally maintain LRU caches at every edge POP and want to see if you can implement one with a doubly-linked list and a hash map.
- #82mediumfrequently asked
82. Find Minimum in Rotated Sorted Array
Find the minimum in a rotated sorted array. Vercel asks this for the binary-search-on-rotation-point pattern — same shape as locating the pivot in their consistent-hashing ring after a node was repositioned.
- #88mediumfrequently asked
88. Number of Islands
Count the number of islands in a 2D grid of '1' (land) and '0' (water). Vercel asks this for the canonical grid-DFS / connected-components pattern — same shape as counting disjoint edge-failure clusters in their network monitoring.
- #89mediumfrequently asked
89. Course Schedule
Given a list of course prerequisites, determine if you can finish all courses. Vercel asks this for cycle detection in a directed graph — literally the same algorithm they use to detect dependency cycles in their deployment graph (build A depends on B, B on C, C on A is a deploy-killer).
- #90mediumfrequently asked
90. Implement Trie (Prefix Tree)
Implement a Trie with insert, search, and startsWith. Vercel asks this because Tries are the natural data structure for their route-segment matching — each path segment becomes a node, and prefix-search is exactly what the router does on every request.
- #91mediumfrequently asked
91. Kth Largest Element in an Array
Find the k-th largest element in an unsorted array. Vercel asks this for the min-heap and quickselect approaches — same shape as picking the top-k by latency in their edge-performance monitor.
- #92mediumfrequently asked
92. Lowest Common Ancestor of a Binary Tree
Find the lowest common ancestor of two nodes in a binary tree. Vercel asks this because LCA is the natural primitive for their route-tree common-segment resolution — exactly how they find the shared prefix between two dynamic routes.
- #93mediumfrequently asked
93. Product of Array Except Self
For each index, return the product of all other elements, without using division and in O(n). Vercel asks this for the prefix-product + suffix-product technique — same shape as their join-cost calculator across multiple parallel deploy graphs.
- #97hardfrequently asked
97. Merge k Sorted Lists
Merge k sorted linked lists into one. Vercel asks this constantly — they literally merge k sorted log streams from edge POPs in their analytics pipeline, and the heap-based merge is the production solution.
- #99hardfrequently asked
99. Trapping Rain Water
Compute how much rain water can be trapped after raining on an elevation map. Vercel asks this for the two-pointer 'water = min(maxLeft, maxRight) - height' insight — same shape as their bandwidth utilization calculation across uneven edge capacities.
- #100hardfrequently asked
100. Minimum Window Substring
Find the smallest substring of s containing all characters of t. Vercel asks this for the sliding-window-with-counter-map pattern — same shape as their 'find the smallest contiguous region that covers all required edge nodes' optimizer.