For this week we had to implement a string searching algorithm to check how efficient it is in terms of time.
The algorithm that i implemented was the Knuth-Morris-Pratt, the KMP algorithm searches for occurrences of a Word "W" meaning the word we have to look within a main "text string" S that contains the word W and some other random characters.
I used this pseudo code to create my code:
This is the code that i did unfortunately it doesn't work, the code doesn't goes trough all the segment so it isn't looking for the word.
1+1, incomplete.
ResponderEliminar