BAE Systems Interview Question

about the ds and algo ND