void func3(int array[ ], int n, int key) {
for (int j = 0; j < n; j = j + 2) {
if (array[0] == key)
{
int k =
1;
while (k
< n) {
k = k + 1;
}
}
}
}
The best-case complexity isQuestion Blank 1 of 2and the
worst-case complexity isQuestion Blank 2 of 2
void func3(int array[ ], int n, int key) { for (int j = 0; j < n; j = j + 2) { if (array[0] == key) {
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am