🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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)?

  1. A.r + c
  2. B.r × c
  3. C.r − c
  4. 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 →