Given matrix arr [ ] [ ]
vector < vector < int > > arr { { 0 , 1 , 1 , 1 , 0 } , { 1 , 0 , 1 , 0 , 1 } , { 1 , 1 , 1 , 0 , 0 } } ; pair < int , int > p = endpoints ( arr , M , N ) ; cout << " ( " << p . first << " , ▁ " << p . second << " ) " << endl ; }