Question 1 of 5
A ferry office stores passenger counts in a 1D array. Write a linear search from index 0 that also counts comparisons.
public static int[] searchFromStart(int[] seats, int target)
{
/* return {index, checks} with index -1 if missing */
}
(a) Write the loop, the increment of checks, and the equality test. (b) State both returned values for {4, 0, 9} and target 9. (c) State both returned values for the same array and target 5.