IBM TEST CODE KNACK QUESTION 2023|| NOT SOLVED||HELP||IBM Interview experience

Everytime you feel that you have done enough of any topic and then boom here is the first question in hiring challange which you were not able to solve , yesterday on 18th jan 2023 from5-5:30 I had a test for IBM assosciate software eng for freshers , so the question title was "Largest prime elements from the diagonal elements"
The test time-30 minutes
Question level according to me-Medium -hard
Status-Not solved
No.of questions-1
question
Create a two dimensional array of integers numbers and find out largest prime number among all diagonal elements.
E.G of 2-d array are below
1 2 3 4
4 3 2 1
7 8 9 6
13 5 4 3

Princiapl Diagonal 1,3,9,3
Secondary Diagonal 4,2,8,13
if anyone could tell me the approach for this i would really appreciate as after every non-successful interview i try to learn that problem.

Comments (28)