← Questions

Parse nested S-expressions in one pass with exact error positions

0
BasetenCodingLast asked Oct 2026

A coding interview question asked in Baseten's deeper coding round, last asked Oct 2026. It tests parsing, recursion and strings.

Write a parser for a small S-expression language. It reads the input in one left-to-right pass over the characters: no split() or other whole-string tokenizing.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

parsing · recursion · strings

Your code and the AI tutor open when you unlock this question.