Question: Answer the following questions regarding the function / *** This function finds the smallest of an array A: Search array n: array size RETURN minor:

Answer the following questions regarding the function

/ ***

This function finds the smallest of an array

A: Search array

n: array size

RETURN

minor: minor value of the array

*** /

int minor (int A [], int n)

{int i, minor;

minor = A [0];

for (i = 1; i

{if (A [i]

minor = A [i];

}

return minor;

}

1. Write the function that indicates the number of instructions that would be executed in the worst case scenario.

2. Using Big O notation, write the order of complexity of the function

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!