← Quiz: Matrix Traversal: all 13 questions
Quiz: Matrix Traversal · Question 10 of 13
Which key groups cells on the same main diagonal (top-left to bottom-right)?
Which key groups cells on the same main diagonal (top-left to bottom-right)?
- A.r + c
- B.r × c
- C.r − c
- D.max(r, c)
Answer & explanation
Correct answer: r − c
Moving one step down-right adds 1 to both r and c, so r − c stays the same. Anti-diagonals share r + c.
Can you get the rest right without peeking?
Take the timed Quiz: Matrix Traversal quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →