Example #1
0
def test_j():
    soln = Solution()
    assert soln.canFinish(9, [[2, 0], [2, 1], [3, 0], [3, 1], [4, 2], [5, 3],
                              [6, 5], [7, 5], [8, 4], [8, 6], [8, 7]]) == True
Example #2
0
def test_g():
    soln = Solution()
    assert soln.canFinish(6, [[1, 0], [1, 4], [1, 5], [3, 2], [5, 2]]) == True
Example #3
0
def test_h():
    soln = Solution()
    assert soln.canFinish(6, [[2, 0], [3, 1], [4, 2], [5, 2], [5, 3]]) == True
Example #4
0
def test_f():
    soln = Solution()
    assert soln.canFinish(
        6, [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [2, 1], [5, 4]]) == True
Example #5
0
def test_e():
    soln = Solution()
    assert soln.canFinish(6, [[1, 0], [5, 2], [3, 5], [4, 3], [2, 4]]) == False
Example #6
0
def test_c():
    soln = Solution()
    assert soln.canFinish(4, [[1, 0], [2, 1], [3, 2], [1, 3]]) == False
Example #7
0
def test_b():
    soln = Solution()
    assert soln.canFinish(2, [[1, 0], [0, 1]]) == False
Example #8
0
def test_a():
    soln = Solution()
    assert soln.canFinish(2, [[1, 0]]) == True