Find the nth prime number
NVIDIASoftware Engineer · Technical ScreenLast updated
This question assesses algorithmic problem-solving and number-theoretic computation skills, requiring efficient prime generation and complexity analysis in the Coding & Algorithms domain.
Given an integer n (1-indexed), return the n-th prime number (e.g., n=1 -> 2, n=2 -> 3, n=3 -> 5).
Design an algorithm that is efficient for moderately large n (you may state reasonable constraints, e.g., up to 10^5).
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.