Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2614. Prime In Diagonal
Given an n×n integer matrix, return the largest prime number that appears on either the main diagonal or the anti-diagonal (or 0 if none). Note: n ≤ 300 and values ≤ 4×10^6, so primality checks must handle numbers up to a few million efficiently.
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.