sa for sa for and final sa input index again the first characters matchso we compare indices and and this is already computedwith index having the smaller string so that means that now goes into the final suffix arrayand we advance the second groupobtaining sa for sa for and final sa input index once againthe first characters matchso now we have to compare indices and since this is comparison between an element and an elementwe cannot look up the result thus we have to compare characters directly index contains and index contains dso index wins thus goes into the final suffix array and we advance the first group sa for sa for and final sa input index