Exemple #1
0
def build_min_height_bst_from_sorted_array_wrapper(executor, A):
    result = executor.run(
        functools.partial(build_min_height_bst_from_sorted_array, A))

    if generate_inorder(result) != A:
        raise TestFailure('Result binary tree mismatches input array')
    return binary_tree_height(result)
def build_min_height_bst_from_sorted_array_wrapper(executor, A):
    result = executor.run(
        functools.partial(build_min_height_bst_from_sorted_array, A))

    if generate_inorder(result) != A:
        raise TestFailure("Result binary tree mismatches input array")
    return binary_tree_height(result)
def build_min_height_bst_from_sorted_array_wrapper(timer, A):
    timer.start()
    result = build_min_height_bst_from_sorted_array(A)
    timer.stop()

    if generate_inorder(result) != A:
        raise TestFailureException("Result binary tree mismatches input array")
    return binary_tree_height(result)