sa for sa for and final sa input index /fill in the suffix array information for string str str is the input string sa is an existing array to place the suffix array lcp is an existing array to place the lcp information *void createsuffixarrayconst string strvector savector lcp ifsa size!str length|lcp size!str lengththrow invalid_argument"mismatched vector sizes}int str length)vector sn )vector san )forint ++ si stri ]makesuffixarrayssan )forint ++ sai sai ]makelcparrayssalcp )figure code to set up the first call to makesuffixarraycreate appropriate size arraysand to keep things simplejust use the ascii character codes