i am getting segmentation fault. please help.
Deepak and primes
Hello @meet1708 a)
ur sieve size is not big enough to find 500 000 th prime number.
first check value of 500 000 th prime number and prepare a sieve upto that
b) declare ur array arr as bool to avoid excess memory allocation
and make it global.
do these necessary changes and you will be able to pass all the test cases:
Happy Learning!!