Visa Inc. interview question

a matrix coding question on codesignal.