Regarding Inner loop interation

Wanted to know will it won’t be better if inner loop for traversing unsorted array starts from (i+1) instead of (i) as mentioned in lecture.
Cause comparing (a[i] < a[min_idx]) which is euivalent to (a[i] < a[i]) when j=i

We can have below code as well right? Will below improve computational complexity?

for(i=0;i<n-1;i++)
{
min_idx=i;
for(j=i+1; j<n ; j++)
{
if(a[j] < a[min_idx])
{
min_idx=j;
}
}
swap(a[i],a[min_idx]);

yes this is correct

not much but still it improve

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.