InterviewLegend

Greenfield Coding: Files, Records & Templates

Alex Chen40 min readGuide updated
In this lesson
  • Know what the screen and the onsite greenfield round ask for
  • Turn a plain-text file of fields into clean CSV rows
  • Fill %key% placeholders in one pass and fail on a missing key
  • Merge several data files into a store that answers queries
  • Parse formatted records and filter them on typed rules

Zillow's own interview prep page lists four pieces for software engineers: a STAR behavioral, system design, refactoring and greenfield coding. Its greenfield video describes an exercise that "mimics real world problems you might face on the job vs. leetcode or algorithmic questions". Candidates describe the same thing from the other side. You get a small task that looks like a ticket, a shared editor and an engineer who wants to hear you think.

Recent accounts of the round come first below, then four problems built from the prompts candidates named. Each one is small enough to finish in a session, with a Python reference, tests and the follow-ups an interviewer is likely to push on.

The Zillow angle
Treat it like a ticket from your team. Ask what the input looks like and what should happen with bad data, then write code a colleague could read. A 2024 principal candidate said what mattered was asking relevant questions and explaining the design as it grew.

What the Zillow greenfield coding round looks like

The screen and the onsite round share one format (March 2026). A senior candidate in Mexico City described the screen as live coding on "a regular production problem, it's not LeetCode style". The onsite that followed had four interviews with the hiring team: system design, a refactor round, a STAR behavioral and Greenfield. The candidate's note on that last one was blunt. It's "the same as the screening one but now with someone from the team." So if you pass the screen, expect that format again later in the loop.

Up to three small problems in one pairing session (October 2025). A senior engineer in Guadalajara had a live pairing challenge with "up to 3 problems to solve" and called it "an exercise that is a daily task and not LeetCode like task." The same month, a Mexico City candidate was handed a plain-text file and an expected output, and asked to write the program between them while explaining their thinking. Neither report names the exact task, so the problems below rebuild the shape, never the wording.

Practical is the design, and interviewers still have leeway. A Zillow engineer on Blind in 2024 said some interviewers use LeetCode-style questions and some don't, and a few 2023 candidates got classic mediums. Your recruiter will name the tool. Zillow ran live sessions on HackerRank in reports up to 2024, and a 2024 principal screen ran on CodeSignal.

The skills under these prompts are ordinary ones. 2023 reports point at string functions, maps and sets, and edge cases, at roughly easy to medium difficulty. What separates candidates is the edges. Ask about the blank line, the missing key, the duplicate row and the value with a comma in it, then handle each one in code.

Older problems (2023-2025)

None of the named greenfield prompts falls inside the last twelve months. The newest is from October 2025 and the oldest from August 2023, and three of the four rest on a single report. They're still the best picture of the shape, because the 2026 reports describe the same kind of task without naming it. Each problem below is a small runnable version, newest first.

Transform a plain-text file into the expected output (2025)

In October 2025 a software engineer in Mexico City had a live coding interview built around a scenario with an input and the expected output. They handed over a plain-text file and asked for a program that produced the output, explained as it was written. What the file held isn't on record, so the version below is something like that task: a file of Key: value blocks that has to become CSV rows.

1

Turn a Plain-Text File Into CSV Rows

MediumCommonly asked
Problem
You get the lines of a plain-text file and a list of columns. The file holds records separated by one or more blank lines. Each record line, such as City: Seattle, holds a key and a value separated by a colon. Return CSV lines, starting with a header of the column names joined by commas and followed by one row per record.

Match keys to columns without caring about case or the spaces around the key. Split a line at its first colon only, so a value can hold a colon. Trim each value. Ignore lines with no colon and keys that aren't columns. If a key repeats inside a record, keep the last value.

A missing column gives an empty cell. Skip a record that has none of the columns. When a value holds a comma or a double quote, wrap it in double quotes and double any quote inside it.
Inputlines = ["Address: 12 Pine St", "City: Seattle", "Price: 650000", "", "Address: 9 Oak Ave", "City: Tacoma", "Price: 410000"]columns = ["Address", "City", "Price"]Output["Address,City,Price", "12 Pine St,Seattle,650000", "9 Oak Ave,Tacoma,410000"]

Two records separated by a blank line, each with every column.

How this uses the pattern

Walk the lines once and collect fields into a dict for the current record. A blank line closes the record. At the end, write the header and then one row per record in column order.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Turn a Plain-Text File Into CSV Rows

Loading...
Click "Run" to execute your code
The Zillow angle
The reported round gave an input file and an expected output, which makes the expected output your spec. Read both before you type and list what you see: blank lines, odd casing, extra fields, values with commas. Say each one out loud and ask how it should come out. On a practical round, those questions count as part of the work.
Take it further
The file is too big for memory. Read it line by line and write each row as soon as its record closes, so you only ever hold one record. A generator in Python does this in a few lines, and the logic barely changes. Be ready to say how you'd test it: a file with a trailing record and no final blank line, a file of only blank lines, and a value with a quote inside.

Fill %key% placeholders from a dictionary (2025)

A Zillow machine learning engineer technical screen from July 2025, known from a prep-site listing, asked for something like a tiny template engine. A placeholder is any text between two percent signs, like %key%, and the text inside is a key into a dictionary. Replace each one left to right, copy everything else as it is, and report an error when a key is missing. The listing leaves the error format to you, as long as you say which one you chose.

2

Fill Percent Placeholders From a Dictionary

MediumSometimes asked
Problem
Given a string text and a dict mapping, replace every placeholder with its value. A placeholder starts and ends with a percent sign, and the characters between the two signs are the key. Text outside placeholders is copied unchanged.

Percent signs always come in pairs, and there is no escape syntax. Work left to right. A value you put in is never read again, even if it holds percent signs.

If any placeholder's key is missing from mapping, return None instead of a string.
Inputtext = "a%sd%fasd%dog%sdfisan"mapping = {"sd": "HELLO", "dog": "CAT"}Output"aHELLOfasdCATsdfisan"

%sd% becomes HELLO and %dog% becomes CAT. The text around them stays put.

How this uses the pattern

Use find to jump to the next percent sign, then find again for its partner. Append the plain text before it and the looked-up value, and continue from just past the closing sign.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Fill Percent Placeholders From a Dictionary

Loading...
Click "Run" to execute your code
The Zillow angle
This one came from a screen for a machine learning engineer, a role where Zillow still sometimes asks classic problems. It reads as a string puzzle, and it grades like practical code. State your error choice before you write it, because the prompt makes you pick. Returning None is easy to test, and raising a KeyError that names the key is friendlier to a caller. Either is fine if you say why.
Take it further
The text arrives as a stream. Chunks can end in the middle of a placeholder. Keep a small buffer: emit plain text as soon as you see it, and when a chunk ends after an opening sign, hold the partial key until the closing sign arrives. Memory stays at the size of the longest key. A listing for the same screen also asks which invariants you'd assert in production code, such as an odd count of percent signs.

A service that merges several data files and answers queries (2024)

In September 2024 a principal engineer in Mexico had a technical phone screen on CodeSignal with two engineers. They were asked to build a service that took information from several files, its data sources, and grouped it to answer certain calculations or queries. What mattered, the candidate said, was asking relevant questions and explaining how you were designing the service as you went. The version below is something like that: listing files and view files, joined on an id.

3

Merge Listing Files and Answer Queries

MediumSometimes asked
Problem
Build a ListingStore that loads several CSV files and answers questions across them. Every file arrives as a list of lines, and its first line is a header. Columns can come in any order, so read the header. Skip blank lines and rows with the wrong number of values.

load_listings(lines) reads rows with id, city and price. If an id appears again, in the same file or a later one, the newer row replaces the older one. load_views(lines) reads rows with id and views, and adds the views to that id's total. Views can arrive before their listing does.

average_price(city) returns the average price of the city's listings, rounded down, or -1 when the city has none. top_viewed(city, k) returns up to k of the city's listing ids, most total views first, with ties broken by id. A listing with no views counts as 0.
  1. ListingStore()
  2. load_listings(["id,city,price", "a1,Seattle,600000", "a2,Seattle,700000", "b1,Tacoma,400000"])
  3. load_views(["id,views", "a1,30", "a2,50", "b1,10"])
  4. average_price("Seattle")→ 650000
  5. top_viewed("Seattle", 1)→ ["a2"]

Seattle has two listings averaging 650000, and a2 has the most views.

How this uses the pattern

Keep one dict from id to [city, price] and another from id to total views. Turn each file into a list of row dicts using its header, then the queries are a filter and a sort.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Merge Listing Files and Answer Queries

Loading...
Click "Run" to execute your code
The Zillow angle
Here the questions are the test. Before writing anything, ask what a file looks like, whether ids can repeat, which row wins, and whether views can show up for a listing you haven't seen. Then say your answer and build to it. Keeping the raw data in two dicts and computing each query on demand is easy to explain, and the candidate who reported this said explaining was what counted.
Take it further
The files get big and the queries get frequent. Keep a per-city index from city to its ids, updated on every load, so a query touches only that city. For averages, keep a running sum and count per city, and adjust both when a newer row replaces a listing. If the data outgrows memory, this becomes a database table with an index on city, and the queries become a GROUP BY and an ORDER BY with a LIMIT.

Parse formatted records and filter them by criteria (2023)

Two 2023 reports describe the same task. In August 2023 a software engineer got a list of strings holding formatted "results" and had to filter it on a set of criteria, after a recruiter pitched the round as collaborative and real-world. In September 2023 a senior engineer in New York processed some strings, got the results and filtered them on specific criteria. That candidate said the interviewers wanted programming knowledge and the ability to build a relatively simple system. The version below is something like it.

4

Parse Formatted Records and Filter Them

MediumSometimes asked
Problem
Each string in lines is one record made of key=value pairs separated by semicolons, like "id=r1; city=Seattle; price=650000". Trim spaces around keys and values. A pair splits at its first equals sign, and a piece with no equals sign is ignored. Skip any record that has no id.

Each string in rules is a key, an operator and a value, like "price<=700000". The operators are =, !=, <, <=, > and >=. When both the record's value and the rule's value are numbers, compare them as numbers. Otherwise only equal and not equal apply, as plain string comparisons, and any other operator fails.

Return the ids of the records that pass every rule, in input order. A record missing a rule's key fails that rule. With no rules, every record with an id passes.
Inputlines = ["id=r1; city=Seattle; price=650000; beds=3", "id=r2; city=Tacoma; price=410000; beds=2", "id=r3; city=Seattle; price=720000; beds=4"]rules = ["city=Seattle", "price<=700000"]Output["r1"]

r3 is in Seattle but over the price. r2 is in Tacoma.

How this uses the pattern

Parse each record into a dict, and each rule into a key, an operator and a value. Look for the two-character operators before the one-character ones, or "<=" gets read as "<".

Write it here, or go full screen with the problem, hints and solution beside the editor.

Parse Formatted Records and Filter Them

Loading...
Click "Run" to execute your code
The Zillow angle
The 2023 New York candidate was told the task would not be LeetCode-style, and it wasn't. It's a parser and a filter, and keeping the two apart is the design choice to talk through. With parsing in one function and comparing in another, each rule the interviewer adds touches only one of them. The September candidate rated it easy, so the bar is clean, finished code with the messy inputs handled.
Take it further
If there's time left, expect a requirement to change. A rule that matches either of two values, a range like price between 400000 and 700000, or a sort on the kept records all fit the same design. Each one is a new branch in the comparison or a new step after the filter, and the parser barely moves. Talk through where the change lands before you type it.

What earns points in a greenfield round

The four problems share a rhythm. Read the input and the expected output, ask about the messy cases, build the plain version, then test it with a few asserts you wrote yourself. The October 2025 Mexico City candidate was asked to explain their thinking, and the 2024 principal candidate said the questions and the narration were the point. A finished, readable solution with three of your own tests beats a clever one nobody can follow.

Split parsing from logic, every time. Each problem here has a parse step and a decide step. Keep them in separate functions and every follow-up, from a new column to a stream to a new operator, lands in one place. If time runs short, say what you'd add next and which test would prove it.

Common questions

What is greenfield coding at Zillow?

It's one of the four interview pieces on Zillow's prep page for software engineers. You write new code live for a small, job-like task, such as transforming a file or building a little service that answers queries. In a March 2026 loop it was the screen format, and a Greenfield round in the onsite repeated it with someone from the team.

Does Zillow ask LeetCode questions?

Mostly not for standard software engineer loops since about 2023. Zillow says greenfield coding mimics on-the-job problems, and recruiters have told candidates it isn't LeetCode. Interviewers do have leeway, and machine learning engineer screens still used some classic problems in 2024 and 2025. Prepare practical code first and keep basic data structures fresh.

How should I practice for the Zillow technical interview?

Build each problem here from a blank file on a timer, out loud. Before coding, write down three questions you'd ask about the input. After coding, write three asserts. Then pair it with the refactoring round, which hands you working code to clean up and keeps showing up in loops from 2023 to 2026.

Key Takeaways

  • ✓Zillow's greenfield round is live coding on a small job-like task, used as the screen and again in the onsite.
  • ✓The named prompts are file transforms, templates, merged data files and record filters, all from 2023 to 2025.
  • ✓Ask about blank lines, duplicates, missing keys and bad values before you code, then handle each one.
  • ✓Keep parsing and logic in separate functions, and finish with a few tests you wrote yourself.
Zillow interview guide

Know what Zillow asks before you walk in.

28 coding · 4 system design · 22 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

What Zillow Tests in CodingHad your Zillow interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.