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')
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)
def main(): arr = generate_random_arr.generate_arr(0, 9, 0, 100) print(arr) print(quicksot(arr, 0, len(arr) - 1))
def main(): arr = generate_random_arr.generate_arr(0, 9, 0, 100) print(arr) print(bublesort(arr))
def main(): test_arr = generate_random_arr.generate_arr(1, 50, 0, 100) if test_heapsort(test_arr): print('OK')