/assigns the new supercharacter names /at end of routinesa will have indices into sin sorted order /and will have new character names /returns the number of names assignednote that if /this value is the same as then sa is suffix array for int assignnamesconst vector svector vector sa int int int /radix sort the new character trios radixpasss sa )radixpasssa )radixpasss sa )/find lexicographic names of triples int name int - - - forint ++ ifssa ! |ssa ! |ssa ! ++namec ssa ] ssa ] ssa ]ifsa = sa nameelse sa name/ / return namefigure routine to compute and assign the tri-character names assignnamesshown in figure begins by performing three passes of radix sort thenit assigns names ( numbers)sequentially using the next available number if the current item has different trio of characters than the prior item (recall that the tricharacters have already been sorted by the three passes of radix sortand also recall that and have the same sizeso at line adding adds the number of elements in we can use the basic counting radix sort from to obtain linear-time sort this code is shown in figure the array in represents the indexes into sthe result of the