Why use fft when you can solve a problem using prefix sums? Or rather, why use an atom bomb if you are being bothered by a mosquito?
Cool, thanks!
What is the problem with my solution? my array is not storing more than 50 or
60 numbers.
I am getting correct answer for small N but not for large
I feel the logics are correct and there shouldn’t be a case of overflow