Skip to content

Lesson7#7

Open
Barrakuda8 wants to merge 2 commits into
mainfrom
lesson7
Open

Lesson7#7
Barrakuda8 wants to merge 2 commits into
mainfrom
lesson7

Conversation

@Barrakuda8

Copy link
Copy Markdown
Owner

No description provided.

Comment thread task1.py

print(timeit('sort_bubble(create_rand_lst(5))', number=1000000, globals=globals()))
print(timeit('better_sort_bubble(create_rand_lst(5))', number=1000000, globals=globals()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

выполнено

Comment thread task2.py
print(timeit('merge_sort(create_rand_lst(100))', number=10000, globals=globals()))
print(timeit('better_sort_bubble(create_rand_lst(100))', number=10000, globals=globals()))
print(timeit('merge_sort(create_rand_lst(1000))', number=10000, globals=globals()))
print(timeit('better_sort_bubble(create_rand_lst(1000))', number=10000, globals=globals())) No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

плюс за проведением замеров

Comment thread task3.py
return m


print(median([3, 3, 3, 3, 3, 4, 5]))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не прочитано ДЗ
"Массив размером 2m + 1, где m – натуральное число, заполнен случайным образом."
это важно, т.к. при сортировке медиана будет на позиции m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants