You are viewing a single comment's thread. Return to all comments →
Maximum array size has to be 10^7 which is not possible in case of C. I tried Dynamic memory allocation (malloc) which worked but got TLE for bigger test cases
yeah it is getting a tle. We need to use a different algorithm. I wanted to know what the problem in my code was so i posted my solution.