Implemented the getRow(idx) operation.