(Java)
question 1
Extracted text: public static int linearSearch(int array], int value) { for (int i = 0; i < array.length;="" i++)="" {="" if="" (arrayli)="=" value)="" {="" return="" array[i);="" }="" return="" -1;="" o="" public="" static="" int="" linearsearch(int="" array[],="" int="" value)="" {="" for="" (int="" i="0;" i="">< array.length;="" i++)="" {="" if="" (arrayli)="=" value)="" {="" return="" value;="" }="" else="" {="" return="" -1;="" }="" }="" o="" public="" static="" int="" linearsearch(int="" array[],="" int="" value)="" {="" for="" (int="" i="0;" i="">< array.length;="" i++)="" {="" if="" (array[i]="=" value)="" {="" return="" i;="" }="" else="" {="" return="" -1;="" }="">Extracted text: Which of the following is a correct implementation of linear search on an array? O public static int linearSearch(int array[0, int value) { for (int i = 0; i < array.length;="" i++)="" {="" if="" (arrayli)="=" value)="" {="" return="" i;="" }="" }="" return="" -1;="" }="" public="" static="" int="" linearsearch(int="" array,="" int="" value)="" {="" for="" (int="" i="0;" i="">< array.length;="" i++)="" {="" if="" (arrayli)="=" value)="" {="" return="" array[i);="" }="" else="" {="" return="" -1;="" }="">
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here