class Solution:
"""
@param A: an integer sorted array
@param target: an integer to be inserted
@return: a list of length 2, [index1, index2]
"""
def searchRange(self, A, target):
res = [-1,-1]
for i in range(len(A)):
if A[i] == target:
if res[0] == -1:
res[0] = i
res[1] = i
return res