Anduril Interview Question

Leetcode style question but not hard