Add code for KMP algorithm.
Allow access to length array.