Parallel merge of partial suffix arrays.We now merge these separate arrays together into a single suffix array \(\mathcal{A}\), Consider the simpler case of two partial suffix arrays \(B\) and \(C\) that we would like to merge together. We can achieve this by letting \(i=0\) index \(B\) and \(j=0\) index \(C\). Each iteration of the algorithm then pushes \(B_{i}\) into \(\mathcal{A}\) if \(S_{B_{i\cdots}}<S_{C_{i}}\) and \(C_{i}\) otherwise, repeating until \(i=|B|-1\) and \(j=|C|-1\). To generalize to \(K\) splits, we need only replace the single comparison above with a min-heap requiring \(O(\log K)\ll 10\) work on each iteration.