angry children problem on hackerrank