Problem with linear search
I can't for the life of me grasp this search and it's really getting to me at this point. This is what I've got so far and maybe someone can point out where I've gone wrong.
I also need to return whether or not I found a hit or not, how many probes it took, and return it in the form:
public String linearSearch(Country myCountries, int first1, int last1,
for(int i = 0; i < myCountries.length; i++)
success = linearSearch(myCountries, int first2, int last2, String input[i]);
System.out.println("Success: " + success + " " + myCountries[j].getCountryCode());
found: the search key , probes: x
I dont have a return in here yet because I don't understand what I'm doing wrong here.