I/O efficient dynamic data structures for longest prefix queries

Moshe Hershcovitch, Haim Kaplan*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review


We present an efficient data structure for finding the longest prefix of a query string q in a dynamic database of strings.When the database strings are prefixes of IP-addresses then this is the IP-lookup problem. Our data structure is I/O efficient. It supports a query with a string q using O(logB(n) + |q| B ) I/O operations, where B is the size of a disk block. It also supports an insertion and a deletion of a string q with the same number of I/Os. The data structure requires O(n/B) blocks, and the running time for each operation is O(B logB(n) + |q|).

Original languageEnglish
Pages (from-to)371-390
Number of pages20
Issue number2
StatePublished - Feb 2013


  • Algorithms
  • Data structures
  • I/O model
  • Longest prefix
  • Segment tree
  • String B-tree


Dive into the research topics of 'I/O efficient dynamic data structures for longest prefix queries'. Together they form a unique fingerprint.

Cite this