package lecture01; public class LinearSearch { /* Returns the first location of x in list * -1 if x is not in the list */ static int index(int [] list, int x) { for (int i=0; i