Weird expected answer when more than n courses are in the list

  • 0

    When I give the input "2, [[0,1],[2,3],[9,10]]" the expected answer is true, which seems weird. Maybe we shouldn't consider the case where there are more than n courses but I still think it should prompt some error message instead of giving an answer for an invalid input.

    It would make the problem more clear if the standard solution can tell the reader that such invalid input will not be given or how they should be handled.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.