Solución
solution.tsTypeScript
def search_rotated_array(nums: list[int], target: int) -> int:
# Escribe tu solución aquí
posicion = 0
for i in range(len(nums)):
if target != nums[i]:
posicion += 1
else:
break
if posicion == len(nums):
posicion = -1
return posicion0respuestas