Code Room
CodingHardcod-g439
Subject ParsingLevel Senior–Staff~40 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

Write a recursive-descent parser for a tiny JSON subset and return the parsed Python value. Grammar: a value is an integer (optional leading minus, no decimals), a double-quoted string with no escapes, the literals true/false/null, or an array '[' value (',' value)* ']' (arrays may be empty). There is no whitespace anywhere in the input. Map true/false to Python booleans and null to the string "null". The input is guaranteed well-formed.

Implement
parse_json_subset(s: str) → object
Examples
in["[1,\"hi\",true]"]out[1,"hi",true]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.