17.5 Search for a sequence in a 2d array

#1

Is there something missing in the explanation of the time complexity? “the number of calls is not more than the number of entries in the 2D Array” It should be the number of calls is not more than the number of entries times |S| right? Each entry can be called once with each offset.

0 Likes