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 30 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.
- #4easysometimes asked
4. Remove Duplicates from Sorted Array
Remove duplicates from a sorted array in-place and return the new length. Vercel asks this to test whether you can shed allocations — relevant when their edge runtime has a tight memory budget per function invocation.
- #5easysometimes asked
5. Remove Element
Remove all occurrences of a value from an array in-place and return the new length. Vercel asks this because it's the in-place filter that shows up everywhere in their middleware request-rewriting code path.
- #6easysometimes asked
6. Search Insert Position
Given a sorted array and a target, return the index where the target is or where it should be inserted. Vercel asks this to confirm you can write a clean binary search with the 'lower-bound' semantic — exactly what their route-matching trie uses to find the matching prefix.
- #7easysometimes asked
7. Plus One
Given an array of digits representing a non-negative integer, add one and return the result as an array. Vercel uses this as a 'do you handle carries cleanly' screen — the same skill you need to bump build numbers or version tags in their deployment graph.
- #8easysometimes asked
8. Merge Sorted Array
Merge two sorted arrays into one in-place, with the first array sized to hold both. Vercel asks this for the back-to-front two-pointer trick — relevant whenever they merge per-region cache hit/miss telemetry arrays without allocating.
- #9easysometimes asked
9. Binary Tree Inorder Traversal
Walk a binary tree in-order and return the values. Vercel asks this as a recursion warmup before harder tree problems — and because the iterative version with an explicit stack mirrors how their build graph walks dependencies.
- #10easysometimes asked
10. Same Tree
Given two binary trees, decide if they are structurally identical with the same values at every position. Vercel uses this as a recursion warm-up before deeper tree questions about their route trees.
- #11easysometimes asked
11. Symmetric Tree
Given a binary tree, check if it is a mirror of itself (symmetric around its center). Vercel asks this because the recursive mirror-comparison shape shows up in their A/B route-mirror experiments.
- #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.
- #13easysometimes asked
13. Balanced Binary Tree
Determine if a binary tree is height-balanced (left and right subtrees of every node differ in height by at most 1). Vercel asks this for the early-exit recursive pattern — a small twist on max-depth that catches sloppy candidates.
- #14easysometimes asked
14. Minimum Depth of Binary Tree
Find the shortest path from the root to any leaf. Vercel asks this because the recursion has a subtle gotcha that catches candidates who blindly mirror max-depth.
- #15easyrarely asked
15. Pascal's Triangle
Generate the first numRows of Pascal's triangle. Vercel asks this for the row-from-previous-row recurrence — same pattern they use to compute layer-by-layer rendering costs in their build dependency tree.
- #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.
- #17easysometimes asked
17. Valid Palindrome
Decide whether a string is a palindrome after normalizing (lowercase + remove non-alphanumeric). Vercel asks this to test string-handling fluency plus the two-pointer in-place sweep — same pattern as their URL-segment normalizer.
- #18easysometimes asked
18. Single Number
Given an array where every element appears twice except one, find the single one in O(n) time and O(1) space. Vercel asks this for the XOR trick — useful in cache-line dedup and the kind of bit-level micro-optimizations that show up in their edge runtime.
- #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.
- #20easysometimes asked
20. Min Stack
Design a stack that supports push, pop, top, and getMin in O(1). Vercel asks this because the auxiliary-stack pattern is the same shape they use to track the lowest-cost deployment plan at every point in a rolling release.
- #21easysometimes asked
21. Two Sum II - Input Array Is Sorted
Given a sorted array and a target, return the two indices whose values sum to the target. Vercel asks this to confirm you recognize 'sorted' as the cue for two-pointer over hash map — same instinct you need when their edge data is pre-sorted by request timestamp.
- #22easysometimes asked
22. Majority Element
Find the element that appears more than n/2 times. Vercel asks this for Boyer-Moore — the O(1) space trick that finds the consensus item in a stream, useful for their canary deploy 'majority of nodes report healthy' check.
- #23easysometimes asked
23. Rotate Array
Rotate an array to the right by k steps in-place. Vercel asks this for the reverse-thrice trick — clean O(1) space pattern that catches anyone who hasn't internalized it.
- #24easyrarely asked
24. Reverse Bits
Reverse the bits of a 32-bit unsigned integer. Vercel asks this to see if you can hold bit positions in your head — relevant when working with edge-routing flag masks or compact cache headers.
- #25easyrarely asked
25. Number of 1 Bits
Count the number of set bits in a 32-bit integer (Hamming weight). Vercel uses this as the gateway to bit tricks they reach for in compact feature-flag masks and quick set-difference operations.
- #26easysometimes asked
26. House Robber
Given an array of house values, find the max amount you can rob without robbing two adjacent houses. Vercel asks this as the introductory DP — the same recurrence shape as their 'pick-at-most-N-non-conflicting-deploys' scheduling logic.
- #27easyrarely asked
27. Happy Number
Determine whether a number is 'happy' (repeatedly replace with sum of squares of digits until it reaches 1, or loops forever). Vercel asks this for the cycle-detection variant of Floyd's algorithm — same shape as detecting redirect loops in their edge router.
- #28easyrarely asked
28. Isomorphic Strings
Determine if two strings are isomorphic (consistent one-to-one character mapping). Vercel asks this because the bidirectional-mapping check is the same shape as their canary deploy 'this version maps consistently to that traffic slice' validator.
- #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.