Reputation: 41
If I have a matrix, and a row, how can I determine the how many-th row it is in the matrix?
For example, if i got a matrix [[1,2,3],[4,5,6],[7,8,9]]
and I got the row [4,5,6]
, then I want to know it's the second row a.k.a. board[1]
.
(This is just a small example, but it is supposed to be checked on bigger matrices)
Upvotes: 1
Views: 34