Why should I return -1 at the end of a linear search if the element was not found?
int linearSearch(int[] list, int size, int key){
for(int index=0; index<size; index++)
if(list[index]==key)
return index;
return -1;
}//linearSearch