KMP Algorithm
1. Which of the following is the best description of a substring?
2. Which of the following is not a prefix of the string “algorithm” ?
Which of the following is a suffix of the string “vlabs” ?
Difficulty: Beginner
4.
1 def f(n):
2 If n == 0 or n == 1: return 1
3 return f(n-1) + f(n-2)
Time complexity of this program: