Given a 01 matrix, find the longest line of consecutive 1 in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Example 1: Input: [[0,1,1,0], [0,1,1,0], [0,0,0,1]] Output: 3 Explanation: (0,1) (1,2) (2,3) Example 2: Input:…