Searching in Linear Structures