Given a positive integer n, return the n-th prime number (where 1st prime is 2, 2nd is 3, 3rd is 5, etc.). Optimize the approach to perform efficiently for larger values of n.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.