Section 1: A Bike, a Radius, and a Stranger - Problem Understanding & Clarifications
Executive Summary: The prompt sounds like a weekend project: a table of listings, a form, a search box. It is really a two-sided local marketplace that stands or falls on four forces: supply, discovery, conversation and trust. We break the prompt into those forces, run a clarification exchange where every answer removes a block of complexity, write the assumptions down, and meet Maya and Daniel, whose road bike runs through all thirteen sections.
The interviewer reads it off a card:
"Design a local classifieds marketplace like Craigslist or OfferUp. Sellers post items for sale with photos and a location; buyers browse and search for things near them, and message the seller to arrange a meetup. Money changes hands in person, not through us. Assume the US and tens of millions of users."
You can feel the pull to start drawing. A listings table, a POST endpoint, a LIKE '%bike%' query, done. Resist it. That answer describes a database, and the interviewer asked for a marketplace.
The Trap: "It's CRUD With a Search Box"
A marketplace has two sides, and each one only shows up if the other is already there. Sellers post where buyers look; buyers look where sellers post. That makes every weakness two-sided too. If posting is slow, supply thins and search gets worse. If search is stale, buyers leave and sellers stop bothering. If one scam gets through, both sides lose trust at the same moment.
So before asking a single question, map the prompt onto the forces that actually hold the system up:
- Supply: sellers posting items, mostly from a phone, mostly with several photos. Photos are where the bytes are, and they leak things (a photo's GPS tag can point straight at a seller's front door).
- Discovery: buyers finding things near them. That's geo plus text plus filters, and it has to be fresh. A bike posted an hour ago that search can't find is a bike that doesn't exist.
- Conversation: buyer and seller talking to arrange a meetup, without either one handing a stranger their phone number.
- Trust: spam, reposts, prohibited items and scams. This is the force that kills marketplaces, because once people expect a scam, they stop showing up.
Key Insight: Three of these forces are features. Trust is the one candidates leave for the last five minutes, and it's the one that decides whether the marketplace survives. Name it in the first five minutes and the interviewer knows you've thought about marketplaces before, not just databases.
Quick check before moving on:
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson