Array
2661. First Completely Painted Row or Column
Given an array arr (a permutation of 1..m·n) and a matrix mat of the same numbers. Numbers are "painted" in the order of arr. Find the index in arr at which some row or column of mat first becomes…
Loading…