Selection Sort - Time Complexity

preview_player
Показать описание
Video 21 of a series explaining the basic concepts of Data Structures and Algorithms.

This video explains the time complexity analysis for the selection sort algorithm.

This video is meant for educational purposes only.
Рекомендации по теме
Комментарии
Автор

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

riteshchaudhary
Автор

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.

DaaboulMohamad
Автор

Thank you again Lalitha. This was very informative and very well explained.

functionator
Автор

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

gokulannam
Автор

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

😄

birenmer
Автор

thank you so much for this video <3

rahiqal-makhtum
Автор

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]

carloslopez-cacheux
Автор

Can you do the best case complexity of bubbule, linear, insertion and selection sort

ayeshazworld
Автор

Thank you so much. Can you explain that for HeapSelection as well?

ennymore
Автор

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

ahmidahmid
Автор

Mam staring loop ki primitive operation is n hoga .
Becoz. I=5 then I=0, 1, 2, 3, 4 भी ayegana

darshanrathodcoder