Find Heap Objects Not Referenced by the Stack
Company: Anduril
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: Find heap objects that are not directly referenced by any stack address when heap objects have no outgoing references. Use efficient set membership to return unreachable primitive addresses in input order, ignoring duplicate roots and roots outside the heap without mutating inputs.