int linearSearch(int list[], int key, int arraySize) { for (int i = 0; i < arraySize; i++) { if (key == list[i]) return i; } return -1; }