0
/ 10
The code below finds a specific number in an int
array. What is the growth rate, Big O(), of this method, on average?
static int...
The code below finds a specific number in an
int
array. What is the growth rate, Big O(), of this
method, on average?
static int find(int[] nums, int looking)
{
for (int i = 0; i < nums.length; i++) {
if (nums[i] == looking)
return i;
}
return -1;
}
Your feedback will appear here when you check your answer.