InterviewLegend

Parsing Expressions

Alex Chen28 min readUpdated 36 real interview reports

Expression parsing at Anduril usually means an evaluator that keeps growing. Follow-ups add operators, then new number types, then invalid input, and some end with you writing your own tests. A plain expression to evaluate has also shown up on a code-pair screen.

All three problems here run on a stack, and one is small enough to be the easy half of a two-problem round. Write the stack code once and the follow-ups become small edits.

The Anduril angle
Treat bad input as part of the problem from the start. Anduril's code runs next to sensors and radios in the field, where garbled messages are normal. Expect the interviewer to hand you a missing operand, a stray token or a divide by zero and see what your function does. Decide what each one returns before you write the happy path. Then type a few tests in the editor without being asked. One valid case, one empty input and one broken token is enough to show you test your own code.

AndurilPremium lesson · Coding round

The 3 Anduril problems are below.

  1. A Premium questionCoding · Medium · Frequently asked
  2. A Premium questionCoding · Easy
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the Anduril questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Anduril interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Anduril interview guide

Know what Anduril asks before you walk in.

31 coding · 2 system design · 14 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

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