computing the genome length pass 1 pass 2 optimizing the data structure