Why does this work for O(n)


#1

All the test cases were passed, by doing a simple iterative search for the element. Weak test cases maybe! Try to code a more optimized solution