def main():
    arr = generate_random_arr.generate_arr(0, 9, 0, 100)
    passed = True
    for i in range(50):
        arr = generate_random_arr.generate_arr(0, 9, 0, 100)
        passed = passed and test_bublesort_improved(arr)

    if passed:
        print('OK')
Пример #2
0
def main():
    res = 0
    number_of_tests = 90000000
    flag = True
    i = 2
    for _ in range(number_of_tests):
        while flag:
            arr = generate_arr(i, i, 0, 100)
            i += 1
            if not find_k(arr):
                flag = False
        res += i - 1

    print(res // number_of_tests)
Пример #3
0
def main():
    arr = generate_random_arr.generate_arr(0, 9, 0, 100)
    print(arr)
    print(quicksot(arr, 0, len(arr) - 1))
Пример #4
0
def main():
    arr = generate_random_arr.generate_arr(0, 9, 0, 100)
    print(arr)
    print(bublesort(arr))
Пример #5
0
def main():
    test_arr = generate_random_arr.generate_arr(1, 50, 0, 100)
    if test_heapsort(test_arr):
        print('OK')