Greenfield Coding: Payloads, Jobs & Extending Code
- Turn a query that returns everything into one that filters, sorts and limits
- Extend a class you were handed without breaking the calls it already serves
- Parse a JSON payload and answer update and delete calls with clear response payloads
- Write a cron-style job runner that handles missed runs on purpose
A backend engineer who interviewed in Mexico City in June 2025, and got an offer, sat two coding sessions plus a legacy-code maintenance interview, with a profile call, a manager behavioral and a system design around them. The coding topics they listed were Python data structures, PEP8 conventions, standard library functions and object-oriented design. That list tells you what a Zillow backend coding round rewards. Code that reads like a teammate wrote it, built from dict, list, json and sorted, organized into classes you can defend.
Greenfield Coding: Files, Records & Templates covers the half of the greenfield round where you read data and produce output. This lesson is the other half. Each problem here works inside or around structure that already exists: a query you change, a class you extend, a payload you receive and a job that runs on a clock. Each one comes from a single report, so practice the shape and expect the details to differ.
How the Zillow greenfield coding round works
Zillow's interview prep page for software engineers lists four pieces: a STAR behavioral, system design, greenfield coding and refactoring. A March 2026 Mexico City senior candidate calls the screen live coding on "a regular production problem", and says the onsite Greenfield round repeats that format with someone from the team. Interviewers have leeway, and a few 2023 and 2024 candidates still drew classic algorithm problems, so the practical format is the default rather than a promise.
The prompts are short and open on purpose. Something like "parse this payload and add update and delete" leaves the data shape, the error cases and the class layout to you. A September 2024 principal candidate put it plainly about a similar service problem: what mattered was asking relevant questions and explaining how you were designing it. Settle the inputs and the error cases out loud, write the plain version, then run it against a case you chose.
All four problems below reward the same habit. Keep data in plain dicts and lists, put each rule in one small method, and decide what happens on the bad input before you code the good path. When the interviewer adds a requirement, that layout takes it as a few new lines.
Older problems (2024-2025)
Each of the next four comes from one candidate account between March 2024 and April 2025, newest first. None of them gave the exact wording. Every version here is something like the reported task, with a concrete spec added so you can test it.
Change a query so it filters database results
In April 2025 a Mexico City full-stack candidate took two online rounds on CodeSignal. The backend task, in their words, was "about manipulating a query to filter a database", and a backend interviewer then reviewed how they had solved it. The version below hands you a query that returns every listing and asks you to make it honour a set of filters.
Filter Listings With a Query
Problem
filter_listings(listings, query). Today it returns the id of every listing in table order. Each listing is a dict with id, city, price, beds and status. Every row has an id and a price, but the other fields can be missing. Change it so it returns only the ids that match query.query is a dict whose keys are all optional. city matches regardless of case, and status must match exactly. min_price, max_price and min_beds are inclusive bounds. A row missing a field that the query filters on doesn't match. Keys you don't recognise are ignored.Return matching ids ordered by price, lowest first, with ties broken by id. If
sort is "price_desc", order by price highest first, ties still by id. If limit is present, return at most that many ids.z2 is pending, so the status filter drops it. The other two are active Seattle listings under 700,000, cheapest first.
Build a list of small check functions, one per query key that is present, and keep a row only when every check passes. Sort by id first and then by price, so the stable sort leaves ties in id order.
Filter Listings With a Query
Click "Run" to execute your code
Extend an existing codebase and explain your class choices
A December 2024 senior candidate in Mexico had a Zoom coding round where "a code is presented, and you must modify and add functionality to fulfill requirements", then explain "your class choices and preferred methods to achieve this." The code they were given wasn't described. The version below hands you a small class that stores one price per listing and asks you to add price history without breaking the two methods it already has.
Extend a Listing Book With Price History
Problem
ListingBook already exists. add(listing_id, price) stores a listing and ignores an id it has seen before. get(listing_id) returns the current price, or -1 for an unknown id. Keep both working exactly as they do now.Add three methods.
reprice(listing_id, price) sets a new current price and returns True, or returns False for an unknown id. history(listing_id) returns every price the listing has had, oldest first, or an empty list for an unknown id.drops(percent) returns the ids, sorted, of listings whose current price sits at least percent percent below the highest price they have ever had. A listing at its peak never counts. Prices and percents are whole numbers.- ListingBook()
- add("a1", 500000)
- reprice("a1", 450000)→ true
- get("a1")→ 450000
- history("a1")→ [500000,450000]
get keeps working and now returns the latest price. history keeps both.
Give each listing its own small object that holds its price list and its peak. ListingBook keeps a dict from id to that object, and get reads the last price in the list.
Extend a Listing Book With Price History
Click "Run" to execute your code
Parse a JSON payload, then write update and delete methods
A Kansas City software development engineer who got an offer in May 2024 had four interviews, and says each engineer wrote their own coding problem. One of them was to "create a process to extract data from a received JSON payload. Create an update and delete method, then send data payloads back." The version below keeps that order: receive, then update and delete, each answering with a small response payload.
Listing Service With JSON Payloads
Problem
ListingService. receive(payload) takes a JSON string holding an object with a listings array. Store each entry that has an id, keeping only the fields id, address, price and status, and replace any listing already stored under that id. Return how many entries were stored. If the payload isn't valid JSON or has no listings list, store nothing and return 0.get(listing_id) returns the stored listing as a dict, or None. update(listing_id, changes) applies a dict of changes and returns a response dict. On success, ok is true and listing holds the full updated listing. For an unknown id, ok is false and error is "not found", and that check comes before any other.If any key in
changes isn't address, price or status, nothing changes and ok is false. Its error is "unknown field" plus the first such key in sorted order. delete(listing_id) removes the listing and returns ok true with its id, or ok false with the "not found" error when there's nothing to remove.- ListingService()
- receive('{"listings": [{"id": "z1", "address": "12 Pine St", "price": 450000, "status": "active"}, {"address": "no id here", "price": 1}]}')→ 1
- update("z1", {"price": 435000})→ {"ok":true,"listing":{"id":"z1","address":"12 Pine St","price":435000,"status":"active"}}
- update("z9", {"price": 1})→ {"ok":false,"error":"not found"}
The entry without an id is skipped. The update answers with the whole listing so the caller doesn't need a second read.
Parse with json.loads inside a try, check the shape before you trust it, and keep listings in a dict from id to a dict of allowed fields. Validate every key of an update before you write any of them.
Listing Service With JSON Payloads
Click "Run" to execute your code
A small cron-style job runner for reporting
A March 2024 backend candidate in Mexico listed their loop as HR, technical, refactoring, behavioral, system design and "another code interview". In one coding round they "had to write code for a pseudo cron job used for reporting", and called it easy and low stress. The version below is something like that: report jobs that run on a fixed interval, driven by a clock you advance yourself.
Cron-Style Report Runner
Problem
ReportScheduler. Time is a whole number of minutes. schedule(name, every, start) registers a report that first runs at minute start and then every every minutes. Scheduling a name that already exists replaces its timing but keeps its run count.tick(now) runs every report that is due at or before now and returns their names, ordered by due time and then by name. A report that missed several runs, because no tick came for a while, runs once and moves its next run to the first slot after now on its original grid.cancel(name) removes a report and returns True, or False if there was nothing to cancel. A cancelled report keeps its run count. runs(name) returns how many times a report has run, 0 for an unknown name.- ReportScheduler()
- schedule("daily_sales", 60, 0)
- tick(0)→ ["daily_sales"]
- tick(30)→ []
- tick(60)→ ["daily_sales"]
- runs("daily_sales")→ 2
It runs at minute 0, isn't due at 30, and runs again at 60.
Keep a dict from name to [next_run, every]. On each tick, collect the due reports as (next_run, name) pairs, sort them, and move each next_run forward past now in one step.
Cron-Style Report Runner
Click "Run" to execute your code
What earns points
These four share a grading pattern. The happy path is short in every one of them, so the score comes from the decisions around it. What does a missing field do to a filter? Do old callers of the class still work, what does a bad payload return, and how does a late job catch up? Name each decision before you code it, and pick one. An interviewer can disagree with a choice you explained. A choice you never noticed reads as a gap.
Common questions
Does Zillow ask LeetCode questions in the coding interview?
Mostly not anymore. The format turned practical around mid-2023, and Zillow's prep page describes greenfield coding as real-world problems instead of LeetCode. Interviewers still have leeway, and a few 2023 and 2024 candidates got classic algorithm problems, so spend a little time on those too. The classic problems lessons cover the ones that have come up.
What language should I use for a Zillow backend interview?
General rounds let you pick. Python is common in Mexico backend loops, where a June 2025 candidate was asked about PEP8, the standard library and object-oriented design, and a November 2026 Mexico City backend posting names Python in its title. Use the language you write fastest, and write it the way its style guide says. Plan on no AI help unless the recruiter tells you otherwise.
How should I practice these four?
Build each from the starter with a timer running, saying your design choices out loud as you go. Then reread the "Take it further" note and talk through it without writing code: SQL for the filter, a time window for price drops, partial failure for payloads and a heap for the scheduler. Finish with the refactoring round, which turns up in loop reports from 2023 through 2026.
Key Takeaways
- ✓Zillow greenfield problems are small backend tasks, so the score sits in the decisions around the happy path.
- ✓When you extend existing code, keep old behaviour working and explain where your new class lives and why.
- ✓Answer bad payloads and unknown ids with a clear response dict, and validate an update before writing any of it.
- ✓For scheduled jobs, decide how missed runs behave and keep the schedule on its original grid.
Zillow interview guideKnow what Zillow asks before you walk in.
28 coding · 4 system design · 22 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.