Optasia Interview Question

problem solving with two question