A sequence avoids a pattern π ∈ R if there is no subsequence that shares the same relative ordering as π. We develop techniques to understand how many queries it takes to test whether a sequence is π-avoiding or -far from π-avoiding. We initiate the study of searching in π-avoiding or nearly π-avoiding sequences, and show that it is possible to efficiently find most elements in a nearly (2, 1)-...