Given tasks and their upstream dependencies, return the order a scheduler should run them in. Detect cycles rather than looping forever.
ValueError naming one task in the cycleKeyErrorCommunity-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.