Create an algorithm in Python to search an element from a given array of integers.
arr = [3, 5, 6, 9, 11]
def searchElement(arr, element):
    for i in range(len(arr)):
        if arr[i] == element:
            return i
    return -1