def find(array, key):                                               # O(N)
    """
    Find an element in an array of tuples

    >>> find([('human', 42), ('cat', 22)], 'cat')
    1
    >>> find([('human', 42), ('cat', 22)], 'dog')
    -1
    """
    length = len(array)                                             # O(1)
    for i in range(0, length):                                      # O(N)
        element = array[i]                                          # O(1)
        if element[0] == key:                                       # O(1)
            return i                                                # O(1)

    return -1                                                       # O(1)