https://www.hackerrank.com/contests/oct13/challenges/angry-children-2