Skip to main content

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 12 problems of 25

  • #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.

  • #15mediumfrequently asked

    15. 3Sum

    eBay's fraud detection team looks for triplets of transaction amounts that satisfy suspicious relationships — 3Sum is the algorithmic core. It's a medium-difficulty staple in eBay's onsite loop because it tests whether you can extend a known pattern (Two Sum) to handle duplicates and a sorted-array constraint cleanly.

  • #33mediumfrequently asked

    33. Search in Rotated Sorted Array

    eBay's inventory system maintains sorted product ID ranges that can be 'rotated' after a shard rebalancing. Search in Rotated Sorted Array is the binary search variant eBay uses to test whether candidates can maintain the O(log n) invariant even when the sort order is disrupted. Correctly identifying which half is sorted is the key insight.

  • #49mediumfrequently asked

    49. Group Anagrams

    eBay's catalog deduplication system groups semantically equivalent product titles — 'Nike Shoe Air Max' and 'Air Max Nike Shoe' should map to the same listing cluster. Group Anagrams is the algorithmic skeleton: given a set of strings, bucket them by canonical form. Choosing the right canonical key (sorted vs. frequency count) reveals your understanding of hashing and time-space tradeoffs.

  • #56mediumfrequently asked

    56. Merge Intervals

    eBay's seller calendar and auction scheduling system must merge overlapping time windows — two auctions that overlap should be shown as a single block. Merge Intervals is a practical sorting-and-sweep problem that eBay uses to test systematic interval reasoning and clean boundary condition handling.

  • #139mediumfrequently asked

    139. Word Break

    eBay's search team segments raw query strings into recognizable product keywords — 'iPhonecase' into 'iPhone' and 'case'. Word Break is the dynamic programming core of this segmentation problem. eBay interviewers use it to test bottom-up DP intuition and hash-set lookup optimization for the dictionary.

  • #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.

  • #207mediumfrequently asked

    207. Course Schedule

    eBay's seller onboarding pipeline has steps that depend on other steps — account verification must precede listing creation, which must precede payment setup. Detecting whether such a dependency graph has a cycle is the problem Course Schedule solves. It's a graph-cycle-detection problem that eBay uses to test topological sort and the three-color DFS cycle-detection pattern.

  • #238mediumfrequently asked

    238. Product of Array Except Self

    eBay's pricing engine computes the impact of removing one item from a basket — 'what is the product of all other prices?' This problem tests whether you can achieve O(n) without division by building prefix and suffix products. The no-division constraint is the key challenge and a signal of strong algorithmic thinking.

  • #322mediumfrequently asked

    322. Coin Change

    eBay's payment system needs to compute optimal change breakdowns for buyer refunds — given a set of available credit denominations, what is the fewest credits needed to make a specific refund amount? Coin Change is the canonical DP formulation of this problem and is a staple eBay medium that tests bottom-up DP setup and the optimal substructure insight.

  • #347mediumfrequently asked

    347. Top K Frequent Elements

    eBay's search team computes the top-K most searched items, trending product categories, and popular sellers in real time. Top K Frequent Elements is the canonical algorithm interview version. The key insight is that a min-heap of size k is faster than full sorting when k is small — a distinction eBay senior engineers look for.

Related interview-prep guides

Interview Platforms

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.

eBay Coding Interview Questions — Full Solutions — InterviewChamp.AI