Fast Fourier Transform, Algorithms, Pattern Matching, Convolution, Combination Sum.
will pad p with 16 0s and q with 17 0s. But if size of q = 17, then total size is 33 and the next greater power of 2 is 64, thus it will have to pad p with 48 0s and q with 47 0s. Thus whenever size of p + size of q is 1 more than a power of 2, the time required becomes almost double as size