ShopUp interview question

Asked puzzles from geeks for geeks