This was the only video where all my doubts regarding theoretical time complexity is cleared. Watching this just 5 min before exam ..Thank you so much :P
Thank you for the great explanation with much details, I am a Computer Science and this video benefited me a lot since I am currently taking Data Structure and Algorithm course.
if the 1st for loop the statement arr[i] = arr[min_index] don't you think it has 3*(N-1) primitive operation ?? please reply if not why?? N yes the tutorials are very helpful thank you for that 😄
thr j loop runs (n(n-1)/2)-1 for n=5 (5(4)/2)-1=9 the series doesn't include first element as its considered sorted and the loop skips it so j doesn't start at 0 index it starts at 1 the correct formula is above
Tested the code and it does not work. It only moves the lowest value in the array to almost the last slot in the array, but the for loop does not even get there because it is set to stop at i < [length - 1] which is [length - 2]
This was the only video where all my doubts regarding theoretical time complexity is cleared. Watching this just 5 min before exam ..Thank you so much :P
Thank you for the great explanation with much details, I am a Computer Science and this video benefited me a lot since I am currently taking Data Structure and Algorithm course.
Thank you again Lalitha. This was very informative and very well explained.
if the 1st for loop the statement arr[i] = arr[min_index]
don't you think it has 3*(N-1) primitive operation ?? please reply
if not why??
N yes the tutorials are very helpful thank you for that
😄
x = n-1
Thank u mam. Easy to learn with you
Can you do the best case complexity of bubbule,linear,insertion and selection sort
Thank you so much. Can you explain that for HeapSelection as well?
for J loop there will be failed cases also know? so will it be (x+N-1) instead of (x+1) for j loop condition
thanks
thr j loop runs
(n(n-1)/2)-1 for n=5
(5(4)/2)-1=9
the series doesn't include first element as its considered sorted and the loop skips it so j doesn't start at 0 index it starts at 1 the correct formula is above
If I'm correct, if you pay attention, she started the indexing at i+1 (so 1), not at i (so at 0).
So, I think she had it right.
crazy good, big thanks :D
thank you so much for this video
Tested the code and it does not work. It only moves the lowest value in the array to almost the last slot in the array, but the for loop does not even get there because it is set to stop at i < [length - 1] which is [length - 2]
what will be best case? define both
Selection sort doesn't have any worst case, j loop always runs for n^2 times. T(n)=Theta(n^2)
Only swaps will be 0 at best case and n at worst case
Mam staring loop ki primitive operation is n hoga .
Becoz. I=5 then I=0,1,2,3,4 भी ayegana
libdash