JX Holdings interview question

Matrix determination