Question: C++ programming, please tell me the right answer and explain to me. Consider the following lines of code. The function my Sort sorts an array

C++ programming, please tell me the right answer and explain to me.  C++ programming, please tell me the right answer and explain to

Consider the following lines of code. The function my Sort sorts an array in ascending order void swap (int *first, int *second) int temp *first; *first*second *second = temp ; void mySort(int arr], int n) int min = arr[0]; int index; for(int i-0; i arrlj]) min arr[j]; index = j; swap (&arr[i], &arr[index]); What is the complexity of this my Sort function? Select one O a. O(n) O b. O(n) O C. O( log n) O d. O( n log n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!