Function to check if nodes lies on same path or not
function isVertexAtSamePath ( mtrx , vrtx , v1 , v2 , i ) { let lca = samePathUtil ( mtrx , vrtx , v1 - 1 , v2 - 1 , i ) ; if ( lca == v1 - 1 lca == v2 - 1 ) return true ; return false ; }