Computer scienceAlgorithms and data structuresAlgorithmsString algorithmsSubstring search algorithms

Calculating prefix function

Prefix function to rescue

Report a typo

Alex has stored a 7-character passkey and its prefix function in his device memory. But somehow he lost the first three characters from the string as well as the first four elements of the prefix function. The remaining four characters are AABCAABC and the last three elements of the prefix function are [1,2,3][1,2,3]. What are the first three characters of the pass key?

Select one option from the list

Create a free account to access the full topic