Find X in a partially sorted Array
JavaScript (E6) 97.5 (39*5*0.5)

(O(n), linear search, the array can be scrambled again and again)
The function accepts (and ignores) a third parameter

F=(a,x)=&gt;a.map((e,i)=&gt;e-x?0:j=i,j=-1)|j


or

F=(a,x)=&gt;a.some((e,i)=&gt;(j=i,e==x))?j:-1


or

F=(a,x)=&gt;a.every((e,i)=&gt;(j=i,e-x))?-1:j


Test in FireFox/FireBug console

F([5, 2, 3, 4, -1, 6, 90, 80, 70, 100],-1, 2)


Output

4