Solutions Architect Coding Interview and How to Prepare
What the solutions architect coding interview really tests, from cost arithmetic in Python to hidden tests, with a worked example and the mistakes to avoid.
Updated
The solutions architect coding interview is usually a short, practical scripting task rather than an algorithm puzzle. You are asked to turn a business rule into correct, readable Python, often involving money, units and messy input, while explaining what you are doing. It checks that your designs come from someone who can prototype, estimate and automate.
This post covers the coding round only. For the whole loop, start with the Solutions Architect interview guide.
Do solutions architects really code in interviews?#
It depends on the company, and candidates report both answers. Some cloud providers run solutions architect loops with no coding round at all and test depth through design and technical questions instead. Others, particularly for prototyping, partner or data-platform architect roles, set a live scripting task or a take-home assignment, and some data platform vendors publish prep notes that list a coding assignment alongside the design and presentation rounds.
Where coding appears, the bar is generally lower than for a software engineer. Reports describe easy to medium problems with a practical flavour: parsing JSON, aggregating usage data, calling an API with pagination, or calculating something a customer would care about. Few interviewers ask for dynamic programming. Many will ask what your code does when the input is wrong.
In our practice papers, coding carries 10 percent of the score. The task is a Python exercise estimating a monthly cloud bill, written in the browser with hidden tests. It runs for about 13 minutes in the 30-minute paper, 18 in the 45 and 20 in the 60.
What kind of problem to expect#
Expect a problem that looks like a real piece of architect work:
- Pricing or cost arithmetic: hours times rates, tiered pricing, free allowances, commitments.
- Aggregation over usage or log records grouped by account, team or service.
- Light data cleaning: inconsistent casing, missing fields, units that need converting.
- Occasionally a small API or file-parsing task.
The data is usually small but deliberately untidy. A record with a missing tag, a quantity in the wrong unit or a negative credit line is there to see whether you notice.
Talking while coding#
Architects are judged on communication, and the coding round is no exception. A good rhythm:
- Restate the task in one sentence, then ask about units, rounding and what to do with bad records.
- Describe the shape of your data before writing logic: "a dict of team to total, in decimals".
- Build the simplest path end to end, run it, then add edge cases one at a time.
- Narrate decisions, not keystrokes. "I'm using Decimal because this is money" is useful. Reading your code aloud is not.
- Finish by stating complexity and what you would check against a real invoice.
Testing as you go#
Hidden tests in this genre tend to probe the same things: empty input, a single record, boundary values for tiers, rounding to the cent, units, negative amounts such as credits, and records that should be skipped or grouped differently. Scale is rarely the issue at this level, but linear time is expected and a nested loop over all records per group will be noticed.
Write two or three tiny inputs of your own and run them before you say you are done. Print intermediate totals while developing, then remove the prints.
Worked example - splitting a shared bill by team#
This is an invented problem in the same genre, not the exercise from our papers. A customer's billing export has line items with a cost and an optional team tag. Tagged costs go to that team. Untagged costs are shared out in proportion to each team's tagged spend. Totals must be exact to the cent.
First clarify: is the tag case-sensitive? (Assume not, and strip whitespace.) Can costs be negative? (Yes, credits.) What if nothing is tagged? (Report it as unallocated.)
The first step normalises tags and sums costs, using Decimal from strings so floats never touch the money.
from collections import defaultdict
from decimal import Decimal, ROUND_HALF_UP
def sum_by_team(line_items):
tagged = defaultdict(Decimal)
untagged = Decimal("0")
for item in line_items:
cost = Decimal(str(item["cost"]))
team = (item.get("team") or "").strip().lower()
if team:
tagged[team] += cost
else:
untagged += cost
return dict(tagged), untaggedThe second step shares out the untagged amount. Rounding each share can leave a cent over or under, so the drift goes to the largest team and the grand total still matches the bill.
def allocate(line_items):
tagged, untagged = sum_by_team(line_items)
total = sum(tagged.values())
if total <= 0:
return {**tagged, "unallocated": untagged}
cent = Decimal("0.01")
shares = {
team: (untagged * cost / total).quantize(cent, ROUND_HALF_UP)
for team, cost in tagged.items()
}
drift = untagged.quantize(cent, ROUND_HALF_UP) - sum(shares.values())
biggest = max(tagged, key=tagged.get)
shares[biggest] += drift
return {team: tagged[team] + shares[team] for team in tagged}Then test it out loud. An empty list returns an empty result with zero unallocated. Three teams sharing one cent should still sum to one cent. A tag of " Payments " and "payments" should land together. A large credit that makes total tagged spend zero or negative falls back to unallocated rather than dividing by zero or producing negative shares. The whole thing is linear in the number of line items.
A strong candidate would also mention what they would ask the customer: should shared networking be split by spend or by traffic, and who signs off the rule? That is the architect showing through the code.
Common mistakes#
- Using floats for money. Small errors accumulate and hidden tests that check exact cents will fail.
- Not asking about units. Hours versus seconds or GB versus GiB changes every answer.
- Silently dropping bad records. Decide with the interviewer whether to skip, flag or fail, then say so.
- Writing everything before running anything. Run early with a tiny input; it is faster to find mistakes in ten lines than in sixty.
- Going quiet. Silence for five minutes leaves the interviewer nothing to score on communication.
- Over-engineering. Classes, plugins and config files for a 15-minute task suggest weak judgement about scope.
How to prepare#
Write three or four small scripts that price a workload from a CSV, aggregate usage by tag, and apply tiered rates. Time each one at 15 to 20 minutes and talk through it as you go. The two-week Solutions Architect prep plan schedules these alongside design practice, and how Solutions Architect interviews are scored explains what Hire-ready coding looks like.
When you can do that comfortably, try the live coding round in a Solutions Architect practice interview and see how your code does against the hidden tests.
Frequently asked questions#
What language is used in a solutions architect coding interview?#
Python is the most common choice because it is readable and widely used for scripting and automation. Some companies allow any mainstream language, and data platform roles may use Python with a DataFrame library or Scala. Our practice papers use Python in the browser. Pick the language you can write fluently without looking up syntax.
How hard is the solutions architect coding round?#
Usually easier than a software engineer's algorithm round, but less forgiving about correctness on business rules. Expect easy to medium scripting: aggregation, pricing logic, parsing and cleaning data. The difficulty is in edge cases, units and rounding rather than clever algorithms, and in explaining your choices clearly while you write.
Should I practise LeetCode for a solutions architect interview?#
A small amount of basic practice helps with fluency in loops, dictionaries and sorting. Hard algorithm problems are rarely asked for this role. Time is better spent writing practical scripts with messy data, such as usage aggregation or cost estimation, and talking through them out loud with a timer running.
What do hidden tests check in a cloud cost exercise?#
They typically check exact results for normal inputs plus edge cases: empty input, a single record, tier boundaries, rounding to the cent, unit conversions, negative credits and records that should be skipped. Passing the visible example is not enough. Write a few tiny tests of your own and run them before you finish.