In-situ inverse algorithm for sequence tables