We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If anyone is able to find one, I'd be very interested in a Python solution that doesn't time out for testcases 6-11. I implemented the exact same algorithm in C++ and it worked immediately, and a quick look at the leaderboards shows a complete domination of C++ solutions, so I don't even know if a solution in Python even exists.
No more comments
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
It's kinda weird that optimized brute force solutions could pass with ease, I didn't expect FFT to show up at the editorial at all.
In authors solution, he is using complex roots of unity.
How does he maintain precision while multiplying the complex numbers. I think in c++ we have complex numbers library support.
I am trying to implement it in JAVA. Can anybody help me
I am not able to import Numpy in my python saolution please help me
If anyone is able to find one, I'd be very interested in a Python solution that doesn't time out for testcases 6-11. I implemented the exact same algorithm in C++ and it worked immediately, and a quick look at the leaderboards shows a complete domination of C++ solutions, so I don't even know if a solution in Python even exists.