linear search works in any array tn on find the index of the given element in the array there are no restrictions on the order of the elements in the array if the element couldn t be found returns 1 find the index of the given element in the array there are no restrictions on the order of the elements in the array if the element couldn t be found returns 1
def linear_search(array, query):
    
    for i, value in enumerate(array):
        if value == query:
            return i
    return -1