Example #1
0
def test1():
    data = [1, 2, 4, 7, 11, 15]
    assert find_numbers_with_sum(data, 15) == [4, 11]
    assert find_numbers_with_sum_naive(data, 15) == [4, 11]
Example #2
0
def test9():
    data = []
    assert find_numbers_with_sum(data, 10) == []
    assert find_numbers_with_sum_naive(data, 10) == []
Example #3
0
def test8():
    data = [1, 1, 1]
    assert find_numbers_with_sum(data, 3) == []
    assert find_numbers_with_sum_naive(data, 3) == []
Example #4
0
def test7():
    data = [1, 2, 1, 2]
    assert find_numbers_with_sum(data, 3) == [1, 2]
    assert find_numbers_with_sum_naive(data, 3) == [1, 2]
Example #5
0
def test6():
    data = [1]
    assert find_numbers_with_sum(data, 1) == []
    assert find_numbers_with_sum_naive(data, 1) == []
Example #6
0
def test5():
    data = [1, 2]
    assert find_numbers_with_sum(data, 4) == []
    assert find_numbers_with_sum_naive(data, 4) == []
Example #7
0
def test3():
    data = [1, 2, 4, 7, 11, 16]
    assert find_numbers_with_sum(data, 10) == []
    assert find_numbers_with_sum_naive(data, 10) == []