InterviewBit Problems   Magician and Chocolates : Solved