← Questions

Parse boolean rule expressions into a syntax tree

0
StripeCodingLast asked Sep 2026

A coding interview question asked in Stripe's onsite coding (debug, integrate, build) round, last asked Sep 2026. It tests parsing, recursive descent and operator precedence.

Risk rules are written as text, such as age >= 18 AND country == "US". Parse one rule string into a syntax tree and return the tree in a canonical prefix form, or return INVALID when any part of the input is malformed.

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

  • Stripe · Onsite coding: debug, integrate, build · Last asked Sep 202660 min · Project editor with starter code and tests: fix bugs in an unfamiliar codebase, wire an external API spec into a service, or complete a skeleton in parts · Varies by session: some onsites have one AI-assisted session and an integration session without AI

What it tests

parsing · recursive descent · operator precedence

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