Diagonal traversal

using (i+j==k) condition

what’s your doubt ??
can you plz elaborate it

how to traverse 1 d array like 2d array