InterviewLegend

Queues, Heaps and Streams

Alex Chen30 min readUpdated 36 real interview reports

A queue question comes up often at Anduril. Sometimes you write it on a blank page. Other times you get someone else's broken C or C++ code with sample tests to make pass, and some versions add a reader thread and a writer thread. Sensor data flowing through a buffer is normal work on Anduril hardware, so the question is close to the actual job.

The other two problems use heaps. All three hold state between calls, and the follow-ups test that state when inputs pile up, expire or arrive from two threads.

The Anduril angle
Say who owns each index before you touch shared state. When one side writes and another reads, each should move only its own index. A broken queue usually fails in one of two ways. Either one side moves the other side's index, or the code can't tell full from empty. Anduril's autonomy teams write this kind of C++ for real vehicles, so expect a question on what a full queue does with a new reading. Pick an answer, drop the reading or overwrite the oldest, and explain why.

AndurilPremium lesson · Coding round

The 3 Anduril problems are below.

  1. A Premium questionCoding · Medium · Signature problem
  2. A Premium questionCoding · Hard
  3. A Premium questionCoding · Hard

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.