Тёмный

Why is Comparison Sorting Ω(n*log(n))? | Asymptotic Bounding & Time Complexity 

Interview Pen
Подписаться 102 тыс.
Просмотров 3,1 тыс.
50% 1

Опубликовано:

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@interviewpen
@interviewpen Год назад
Thanks for watching! Visit interviewpen.com/? for more great Data Structures & Algorithms + System Design content 🧎
@user-mk9tq9mj8c
@user-mk9tq9mj8c 6 месяцев назад
great video, thank you so much!
@interviewpen
@interviewpen 6 месяцев назад
Thanks!
@codewithawaisahmad
@codewithawaisahmad 3 месяца назад
awesome explained brother
@interviewpen
@interviewpen 2 месяца назад
Thanks!
@ResonantFractal
@ResonantFractal Год назад
Thank you for all the awesome material!
@interviewpen
@interviewpen Год назад
sure!
@vaijantachaure2493
@vaijantachaure2493 Год назад
This is awesome, thanks for the detailed explanation with the math! It gives a great view why we can never do better than Ω(nlogn) when it comes to comparison sorting.
@interviewpen
@interviewpen Год назад
thanks & thanks for watching! (aside: we can't do better than Ω(n*log(n) rather than O(n*log(n), big O is an upperbound so it guides on bounding from above, we want to bound from below since we are looking for the best we can do. You can upperbound in the best, average, & worst case. You can lowerbound in the best, average, & worse case. Lower-bounding the best you can do makes the most sense in this discussion.)
@aacfox
@aacfox 6 месяцев назад
the thing i don't hear from anyone is that any comparison sorts can be reduced to two operations: binary search in new (initially empty) sorted array (search for appropriate index of another variable in there), and insertion at that index. First is O(logn) (for much more obvious reasons than all of this), second-O(n). And since the logic is that you need exactly n insertions and one binary search before every insertion, overall complexity will be just a multiplication of these. Which results in O(nlogn).
@interviewpen
@interviewpen 6 месяцев назад
Good point, that's another way to think about it. Thanks for watching!
@n0ks
@n0ks Год назад
Very clear explanation, thanks. What is the program that you use to make your presentations?
@interviewpen
@interviewpen Год назад
cool - an we use GoodNotes
@serbandan6186
@serbandan6186 Год назад
Video Idea: Design a tiktok recomandation algorithm.
@interviewpen
@interviewpen Год назад
Good idea - added to backlog. Thanks for watching.
@dzuchun
@dzuchun Год назад
3:16 log(n) being undefined for n < 1 is cursed. (It's actually n
@interviewpen
@interviewpen Год назад
Good callout - added to description
Далее
10 FORBIDDEN Sorting Algorithms
9:41
Просмотров 853 тыс.
BeastMasters Hawk just had enough #ti13
00:30
Просмотров 121 тыс.
What Is Big O? (Comparing Algorithms)
8:15
Просмотров 170 тыс.
Visualization of Radix sort
7:02
Просмотров 55 тыс.
3 Types of Algorithms Every Programmer Needs to Know
13:12
BeastMasters Hawk just had enough #ti13
00:30
Просмотров 121 тыс.