Philips Interview Question

based logical thinking based on algorithem based on project