Skip to content


  1. Algorithms differ by computational and space complexity
  2. Online or offline
    • Online algorithms search without pre-processing the target data, and need to traverse all data during the search
    • Offline algorithms pre-process the target data and may store it in memory or on disk to speed up query processing (see “Indexes” section below)
  3. Exhaustive or heuristic
    • Exhaustive algorithms guarantee to find all occurrences of the query in the target
    • Heuristic algorithms may not find all similar data. In heuristics, a reduction of the search time is achieved by evaluating only the statistically interesting patterns