kzhereb / kpi-acts-ta2020

Materials for "Algorithm theory" course
MIT License
0 stars 0 forks source link

Q04.3. Benchmarks для алгоритмів сортування #30

Open IllyaKamen opened 4 years ago

IllyaKamen commented 4 years ago
IllyaKamen commented 4 years ago

Benchmarking Sorting Algorithms.zip

Rasim-I commented 4 years ago

The answer to this question already exists, but it is presented in the form of an archive with a project, at the launch of which you can evaluate the speed of such algorithms as bubble sort, insertion, merge, quick sort. But I want to offer a web resource on which algorithms are considered in general, the implementation code is available in the browser (nothing needs to be downloaded), detailed graphs are given, different cases are considered, and even some specific algorithms are present. Link : https://m.habr.com/ru/post/335920/ There is another source that discusses the implementation of algorithms in different programming languages ​​(in the previous source, C ++ was used for implementation), if someone is interested in it. There are also tables with sorting behavior in different situations. Here is it : https://rosettacode.org/wiki/Compare_sorting_algorithms%27_performance#J

PickDough commented 4 years ago

Я вже ділився посиланням на цей ресурс в іншому питанні, але тут він підходить навіть краще, на ньому можна запускати та порівнювати власний код. https://www.measurethat.net/Benchmarks/Show/1475/0/versions-of-quick-sort У даному посиланні на одному і тому самому масиві запускаються quicksort, коли pivot є першим або останнім елементом, таке порівнянян показує важливість обирання опорного елементу, тому що, наприклад, можна було б обрати медіану. Мінусом даної реалізації є те, що алгоритм не in-place.

AndriyBosik commented 4 years ago

https://www.geeksforgeeks.org/analysis-of-different-sorting-techniques/ На цьому сайті наведена часова складність різних алгоритмів сортування(в тому числі і non-comparison sorts) в найкращому, середньому та найгіршому випадку.

Yuliiaa commented 4 years ago

http://alejandroerickson.com/j/2016/08/02/benchmarking-int-sorting-algorithms.html - розглянуто відсортовані, майже відсортовані, зворотньо впорядковані, частково впорядковані масиви різної довжини з різними значеннями.

https://www.toptal.com/developers/sorting-algorithms - просто гарний ресурс з візуальним порівнянням роботи різних алгоритмів сортування на різних вхідних даних.

robertdubson commented 4 years ago

На даному сайті подано гарну візуалізацію деяких алгоритмів сортування: https://tproger.ru/digest/sorting-algorithms-visualized/.