TTM Technologies interview question

Solve this computer programming question