Now when we're iterating over the haystack, thus table allows us to continue searching from the index where the needle mismatched, as opposed to going back to the index after where we started the comparison!
Thus giving us that O(n+m) as O(n*m) performance!
In practice though... We tend to use the naive algorithm! In practice it takes surprising scale for the win to be worth it!
2'/2' Fin for today!