Closed
Description
In knuth morris pratt algorithm, I think it's better to return the "index" of the matched substring in case of success, and -1
in case of failure, so that it would be consistent with the str.find()
in Python. True
and False
aren't that helpful.