I want to know till which no. should i calculate prime no

by using prime suive till hoe much no. i should calculate prime so that i can give ans for the nth prime no.

hi @guptanikhil898

as in constraints it is mention

Constraints

1<=n<=5000000

so make an array of 5000000

int*arr=new int [5000000]{};

i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course