Dark Room and Coins Puzzle || Amazon interview question