Unsorted Membership
Unsorted Membership Search Unsorted membership search determines whether a value exists in a sequence without requiring any ordering. It is a decision version of linear search. The algorithm stops as soon as a match is found, making it efficient when matches occur early. Problem Given a sequence $A$ of length $n$ and a value $x$, determine whether $$ \exists i \text{ such that } A[i] = x $$ Return true...