Question DSA-ARR-0053
MediumIn column-major order, what is the element offset of a[i][j] in an R × C array?
- A.
i × C + j
- B.
j × R + i
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
In column-major order, what is the element offset of a[i][j] in an R × C array?
i × C + j
j × R + i
Sign up free to see the answer and a step-by-step explanation.
i × R + j
j × C + i