Untitled
unknown
plain_text
4 years ago
322 B
4
Indexable
List neighbors(Graph* G, int x){ int i,j; List L; make_null(&L); for(i=1; i<=G->n;i++){ if(i!=x){ for(j=1;j<=G->m;j++) if((G->A[i][j]==1)&&(G->A[x][j]==1)){ push_back(&L,i); break; } } } return L; }
Editor is loading...