For substring search, the average time complexity is O(N*M) where N and M are the lengths of the string and substring, respectively.