GATE CS 2004 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0234

Two matrices M1 and M2 are to be stored in arrays A and B respectively. Each array can be stored either in row-major or column-major order in contiguous memory locations. The time complexity of an algorithm to compute M1 x M2 will be
  1. A
    best if A is in row-major, and B is in column major order
  2. B
    best if both are in row-major order
  3. C
    best if both are in column-major order
  4. D
    independent of the storage scheme

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1036/gate2004-39

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com