TopperLearning Interview Question

A normal puzzle question