HackerRank's Task Scheduling Problem