here is my code
Two of the test cases showing no output
@lakshay2311 t is because n is till 5000000, here means nth prime number, but you have put this as limit of array.
Here nth prime number may be at very high index than n.
1 Like
Also the declare the array global because for local array size limit is around 10^6 but for global it is around 10^8
1 Like
Oh okay got it. Thanks 