Confused...
Back-end part:
int[][] matrix = new int[n][m];
int[] array = new int[n*m];
traversMatrix(matrix);
traversArray(array);
Client part:
function traversMatrix(matrix : int[][])
for (i..n)
for (j..m)
doActions();
function traversArray(array : int[])
for (i..array.size())
doActions();
===================================
Time Complexity for traversMatrix: Quadratic
Time Complexity for traversArray : Linear?
Why?