mergesort

  Рет қаралды 122,181

NOC16 CS11

NOC16 CS11

Күн бұрын

Пікірлер
@ayushganguli1359
@ayushganguli1359 5 жыл бұрын
Not the right program sir. I have tried this program several times and it only returns me a singleton list. I guess problem is there in the first if statement in mergesort function
@bejorrani
@bejorrani 2 жыл бұрын
A shorter Program for Merge Sort. Using recursion without much variables and also usible one of the combine as given in the wrongmergesort program. def mergesort(seq): k=len(seq) if k==1: return seq else: return Merge(mergesort(seq[:k//2]),mergesort(seq[k//2:])) def Merge(seq1,seq2): C,m,n,i,j=[],len(seq1),len(seq2),0,0 while i+j
@pgudipati555
@pgudipati555 7 жыл бұрын
Just wondering, where can I find the lecture-handout (PDF) of this lecture, for download?
@RA-oo4lj
@RA-oo4lj 5 жыл бұрын
Best explanation ever!
@sasikumar6378
@sasikumar6378 5 жыл бұрын
Explain ,if right - left
@vaishnaves1723
@vaishnaves1723 4 жыл бұрын
So right and left are indices right? right - left
@arungandhi5612
@arungandhi5612 4 жыл бұрын
Left Is the first index right is the last index, if left and right are the same then there is only 1 element. If left and right differ by 1 there are 2 elements. So sorting a single element or 2 elements is very is. For eg sort 5 will return 5, and sort 4,5 will return 4,5
@sanketargade3685
@sanketargade3685 3 жыл бұрын
@@vaishnaves1723 how can i consider no element either ther is 3 is present or 2 element is present(3,4)
@nikhilpatil2482
@nikhilpatil2482 4 жыл бұрын
1st method is cool but second is .......................
@keshavmaheshwari6420
@keshavmaheshwari6420 4 жыл бұрын
If I give input list 38 27 43 3 9 82 10 The output I get is 3 9 38 27 43 82 10
@exploringMyself998
@exploringMyself998 4 жыл бұрын
Here, he is just merging the two sorted list in a sorted order, but is not using any divide and conquer strategy. For your input write divide and conquer program and then apply merge sort.
@ByteSizeHacks043
@ByteSizeHacks043 3 ай бұрын
Worst explanation ever He's assuming everyone know these programs before hand and explaining things without stop not even thinking whether the people watching will understand or not
quicksort
14:40
NOC16 CS11
Рет қаралды 76 М.
list comprehension
18:12
NOC16 CS11
Рет қаралды 73 М.
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
tuples and dictionaries
15:56
NOC16 CS11
Рет қаралды 91 М.
arrays vs lists, binary search
24:57
NOC16 CS11
Рет қаралды 142 М.
sets, stacks, queues
18:20
NOC16 CS11
Рет қаралды 70 М.
quicksort analysis
12:35
NOC16 CS11
Рет қаралды 52 М.
user defined lists
23:26
NOC16 CS11
Рет қаралды 57 М.
backtracking, n queens
35:51
NOC16 CS11
Рет қаралды 94 М.
recursion
17:59
NOC16 CS11
Рет қаралды 99 М.
FASTEST Way To Learn Coding and ACTUALLY Get A Job
10:44
Brian Cache
Рет қаралды 1,2 МЛН
efficiency
11:14
NOC16 CS11
Рет қаралды 99 М.
strings
21:40
NOC16 CS11
Рет қаралды 242 М.