X913: Big O - 2

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 Answer:

Select one answer:


Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.