Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2761. Prime Pairs With Target Sum
Find all prime pairs (x, y) with 1 ≤ x ≤ y ≤ n and x + y = n, returning them sorted by x. With n ≤ 10^6 this is typically done by precomputing primes up to n (e.g., sieve) and checking complements for x in [2, n/2].
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.