Wow sir that was a great explanation! sir I think we could have add this optimisation , if(mi != i) swap(arr,i,mi); it would have made the code much better
Thankyou buddy! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. Yes, you are right but optimisation part will be covered in level-2 and level-3.
using recursion import java.io.*; import java.util.*; public class Main { public static void selectionSort(int[] arr,int n) { if(n==arr.length-1){ return; } //write your code here int min=n; for(int i=n+1;i
Started revising sorting algorithms after 5 months...wasted 2 days from notes, but now revised all 6 algos in just 2 hours from Sir...Thanks Sir
sir your explanation method is awesome, can you please make a video on how to find time and space complexity ?
Done!
Sir,You are awesome
Thank you and so are you. We are both awesome together.
Sir Time complexity ka playlist v upload krye sir
Wow sir that was a great explanation! sir I think we could have add this optimisation ,
if(mi != i)
swap(arr,i,mi);
it would have made the code much better
Thankyou buddy!
I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
Yes, you are right but optimisation part will be covered in level-2 and level-3.
@@Pepcoding sure sir thank you for rectifying my query
Sir Sare questions ki time and space kera do
hanji
using recursion
import java.io.*;
import java.util.*;
public class Main {
public static void selectionSort(int[] arr,int n) {
if(n==arr.length-1){
return;
}
//write your code here
int min=n;
for(int i=n+1;i