Citadel Interview Question

Hard Leet code style question