Airbus Interview Question

Puzzle and simple leet code coding question