GlobalLogic Interview Question

puzzles (refer geeksforgeeks)