https://www.hackerrank.com/challenges/k-candy-store