TTM Technologies Interview Question

Solve this computer programming question