input: Write a function to implement a linear search algorithm to search through a given array. The function should return the position of the search item if found, otherwise return -1. If the array is empty, return -1.
  assert linearSearch('bookstore')==2
  assert linearSearch('theatre')==4
  assert linearSearch('hospital')==1
  assert linearSearch('zoo')==-1
  assert linearSearch('')==-1
output: def linearSearch(arr):
      if not arr:
          return -1
      for i in range(len(arr)):
          if arr[i] == 'o':
              return i
      return -1