4 ms·
Um. Just had a look at Common Questions Part 1 (http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_Interview_Practice_Questions_Person_A.pdf http://co
by 10ren 17y ago
Um. Just had a look at Common Questions Part 1 (http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_Interview_Practice_Questions_Person_A.pdf http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_...), and the first question is about substring matching.
Instead of giving a Boyer-Moore style solution (with sub-linear complexity), it gives the naive approach (with quadratic complexity).