10 Examples (3) // Find largest value int largest(int array[], int n) { int currlarge = 0; // Largest value seen for (int i=1; i<n; i++) // For each v
{"Image DocumentName": "Examples (3) // Find largest value int largest(int array[], int n) {", "Image ImageDescription": "int currlarge = 0; // Largest value seen. for (int i=1; i<n; i++) // For each val. if (array[currlarge] < array[i]) currlarge = i; // Remember pos. return currlarge; // Return largest. } As n grows, how does T(n) grow? Cost: T(n) = c1n + c2 steps.", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}