Update the KMP solution