Fast Fourier Transform, Algorithms, Pattern Matching, Convolution, Combination Sum.
pattern_search(s, pat): p_coefficients = [] for x in s: h = ord(x)-ord('a') p_coefficients += [np.exp(2j*np.pi*h/26)] q_coefficients = [] for x in pat: h = ord(x) - ord('a') q_coefficients = [np.exp(2j*np.pi*(26-h)/26)] + q_coefficients c = get_multiplication_coefficients(p_coefficients,