---
title: "数据结构"
author: "echohfut"
date: "2012-03-19T08:30:23Z"
tags: []
categories: ["互联网"]
slug: "untitled"
draft: false
lastmod: "2012-03-19T20:36:49Z"
id: 1457226
url: "https://echohfut.iteye.com/blog/1457226"
---

1\. bloom filter

用于测试一个元素是否在一个很大的数据集中。方法是利用多个hash函数，数据集中的元素通过hash函数到一个位置。查询时，做相同的hash查找。只要有一个hash函数没有match到对应的位置就可以判定该元素不在数据集中。所以该方法可能有false positive但一定没有false Negative。

 

2\. suffix array/tree

把一个字符串的所有后缀字符串按字典排序，另外还可以加上LCP（Longest Common Prefix）