eBay Coding Interview Questions
25 eBay coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an eBay interviewer values, and a FAQ section.
Showing 9 problems of 25
- #1easyvery frequently asked
1. Two Sum
eBay phone screens frequently open with Two Sum as a warm-up to test hash-map fluency. In an e-commerce context, think of it as finding two item prices in a cart that sum to a target gift-card value — a dead-simple scenario that reveals whether you default to O(n²) brute force or reach for a hash map immediately.
- #3mediumvery frequently asked
3. Longest Substring Without Repeating Characters
eBay's search autocomplete and suggestion engine needs to deduplicate character sequences in query strings efficiently. This sliding-window problem is a medium staple in eBay's onsite loop because it requires coordinating a Set and two pointers to achieve O(n) — a clean test of sliding-window mastery before harder variants.
- #4hardsometimes asked
4. Median of Two Sorted Arrays
eBay's pricing analytics team computes median transaction prices across two buyer segments in real time — combining sorted bid histories without merging them. Median of Two Sorted Arrays is the flagship O(log(m+n)) algorithm that eBay uses at the senior level to test binary search mastery beyond basic forms. The partition-based approach is notoriously tricky and strongly differentiates senior candidates.
- #42hardsometimes asked
42. Trapping Rain Water
eBay's data visualization team renders capacity charts for warehouse storage — thinking of elevation bars as bin capacities and water as overflow volume. Trapping Rain Water is a classic two-pointer problem that eBay uses at the hard level to test whether candidates can optimize from O(n) space (prefix/suffix arrays) to O(1) space (two-pointer) through clear reasoning.
- #84hardsometimes asked
84. Largest Rectangle in Histogram
eBay's seller analytics dashboard visualizes listing activity as bar charts — finding the largest contiguous block of equal or taller listings tells analysts about peak sustained activity windows. Largest Rectangle in Histogram is a stack-based hard problem that eBay uses to test monotonic stack mastery, one of the most powerful patterns for range-query problems.
- #127hardsometimes asked
127. Word Ladder
eBay's catalog team maps product category transitions — how many steps does it take to reclassify a listing from one category to a related one, changing only one attribute at a time? Word Ladder is a BFS shortest-path problem on an implicit graph that eBay uses to test graph construction, BFS level-tracking, and neighbor-generation efficiency.
- #146mediumvery frequently asked
146. LRU Cache
eBay's product catalog and search-result caching rely on LRU eviction to keep hot listings in memory while purging stale ones. This design problem tests whether you can compose a hash map and doubly-linked list to achieve O(1) get and put — a real production data structure that eBay's infrastructure engineering teams implement and discuss in depth.
- #200mediumvery frequently asked
200. Number of Islands
eBay's geo-search team segments geographic regions — think grouping contiguous postal codes into delivery zones. Number of Islands is the graph-traversal foundation: count connected components in a grid. eBay interviewers use it to test BFS vs. DFS choice, visited-state management, and whether you can handle a 2D graph without a separate visited matrix.
- #217easysometimes asked
217. Contains Duplicate
eBay uses duplicate detection extensively — deduplicating search results, preventing double-listings, and fraud detection all rely on fast membership checks. Contains Duplicate is the simplest form of this pattern and tests whether you instinctively reach for a Set over a nested loop when you need O(n) duplicate detection.
Related interview-prep guides
VidCruiter Tech Interview Guide for Jobseekers (2026)
VidCruiter is a Canadian-founded hybrid interview platform that combines pre-recorded async video questions with scheduled live video interviews and skill testing in a single multi-step flow. Tech jobseekers encounter it most often in IT, devops, security-ops, and tech-adjacent roles, and the prep that works for HireVue or Zoom alone misses the platform's quirks.
Webex Tech Interview Guide 2026: What the Platform Sees, What It Doesn't, and How Candidates Set Up
Cisco Webex is still the default video platform across legacy enterprise hiring: large banks, insurance carriers, government IT, healthcare systems, and Fortune 500 employers running a Cisco stack. This is the 2026 guide to what Webex captures during a tech interview, what its AI Assistant transcribes, where its OS-level boundary sits, and how candidates set up around it.