Recenty i got stuck in a problem in which i was suppposed to figure out length of longest common subbarray among all rows of a given matrix(n*m) where each row contains permutaion of (1...m) integers .Can anytell how to approach this problem constraints n*m<=1e5 Thanks :)