Тёмный

Counting inversions 

Design and Analysis of Algorithms
Подписаться 10 тыс.
Просмотров 25 тыс.
50% 1

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

 

10 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@ginobean737
@ginobean737 4 года назад
Excellent explanation! This is the BEST explanation of how to count inversions using a merge sort type algorithm that I have found!
@shahkushal1495
@shahkushal1495 4 года назад
If courses are bollywood, NTPEL is the Irfan Khan of it.
@mishkamn
@mishkamn 5 лет назад
Very good straight to the point and clear
@pranavyeleti3499
@pranavyeleti3499 3 года назад
sir countR,R should be mergesortcount(A,mid+1,right).i have a dought.correct me if i am wrong
@0anant0
@0anant0 4 года назад
Very nice explanation. Leetcode 493 is based on this.
@AbhishekChaturvedi7
@AbhishekChaturvedi7 4 года назад
superb explanation
@dejavukun
@dejavukun 4 года назад
Thanks a lot sir!
@cowboymc8230
@cowboymc8230 4 года назад
What I don't understand is the part : sort and count inversions in L and R. I mean since you sort L and R already, the count of inversions in either L or R would be 0, isn't it?
@0anant0
@0anant0 4 года назад
Those recursions occur during the "merge" portion of the L and R halves. The very act of sorting L and R involves 'merge' e.g. cInv += mergeSort(lo to mid)
Далее
Quicksort
17:06
Просмотров 39 тыс.
Closest pair of points
16:35
Просмотров 66 тыс.
КОГДА НЕВЕСТУ ВЫБИРАЕТ МАМА
00:56
No money for Pre workout ?? 😱😱
00:37
Просмотров 3,5 млн
Flipping Robot vs Heavier And Heavier Objects
00:34
Просмотров 2,5 млн
Count Inversions in an Array | Brute and Optimal
24:17
Просмотров 224 тыс.
Counting inversions in an array
19:03
Просмотров 92 тыс.
Common subwords and subsequences
27:19
Просмотров 16 тыс.
КОГДА НЕВЕСТУ ВЫБИРАЕТ МАМА
00:56