Given matrix arr [ ] [ ]
int [ ] [ ] arr = { { 0 , 1 , 1 , 1 , 0 } , { 1 , 0 , 1 , 0 , 1 } , { 1 , 1 , 1 , 0 , 0 } } ; int [ ] p = endpoints ( arr , M , N ) ; System . out . print ( " ( " + p [ 0 ] + " , ▁ " + p [ 1 ] + " ) " + "NEW_LINE"); } }