E_Maksimova_lesson_07#1268
Open
HelenMaksimova wants to merge 1 commit intoDmitryChitalov:masterfrom
HelenMaksimova:E_Maksimova_lesson_07
Open
E_Maksimova_lesson_07#1268HelenMaksimova wants to merge 1 commit intoDmitryChitalov:masterfrom HelenMaksimova:E_Maksimova_lesson_07
HelenMaksimova wants to merge 1 commit intoDmitryChitalov:masterfrom
HelenMaksimova:E_Maksimova_lesson_07
Conversation
| # Массив на 100 элементов (обычная): 0.28453779999999995 | ||
| # Массив на 100 элементов (доработанная): 0.19400640000000002 | ||
|
|
||
| # Как видно по замерам, если массив частично упорядочен, доработанная функция выполняет сортировку значительно быстрее. |
|
|
||
| # Массив на 10 элементов: 0.009952000000000183 | ||
| # Массив на 100 элементов: 0.15717959999999964 | ||
| # Массив на 1000 элементов: 2.2101195000000002 |
| # Несмотря на то, что в худшем случае алгоритм на основе сортировки Шелла тоже будет иметь квадратичную сложность, | ||
| # на практике при правильном подборе шага для предварительных грубых сортировок он будет выдавать самые хорошие | ||
| # результаты при больших N, так как его сложность для частично упорядоченных массивов приближается к линейной - то есть | ||
| # в итоге он совершит гораздо меньшее количество обходов, чем предыдущие два алгоритма. |
Owner
There was a problem hiding this comment.
отличная проработка задания
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Урок 7, Алгоритмы и структуры данных, старт 09.03.2021, Максимова Елена