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 22 problems of 100
- #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.
- #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.
- #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.
- #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.