User Profile

Collapse

Profile Sidebar

Collapse
kaijoh26
kaijoh26
Last Activity: Mar 30 '22, 10:59 AM
Joined: Mar 30 '22
Location: n/a
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I Need help converting this to python i hope someone will help me :(

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    /*ADJACENCY MATRIX*/
    int source,X,Y,time,visited[20],Z[20][20];
    void DFS(int p)
    {
    int q;
    visited[p]=1;
    printf(" %d->",p+1);
    for(q=0;q<X;q++)
    {
    if(Z[p][q]==1&&visited[q]==0)
    DFS(q);
    }
    }
    int main()
    {
    int p,q,x1,x2;
    printf("\t\t\tGraphs\n");
    ...
    See more | Go to post
    Last edited by zmbd; Apr 14 '22, 03:51 AM. Reason: All code must be between [Code][/Code] format tags

  • I Need help converting this to python i hope someone will help me

    #include <stdio.h>
    #include <stdlib.h>
    /*ADJACENCY MATRIX*/
    int source,X,Y,time ,visited[20],Z[20][20];
    void DFS(int p)
    {
    int q;
    visited[p]=1;
    printf(" %d->",p+1);
    for(q=0;q<X;q++ )
    {
    if(Z[p][q]==1&&visited[q]==0)
    DFS(q);
    }
    }
    int main()
    {
    int p,q,x1,x2;
    printf("\t\t\tG raphs\n");...
    See more | Go to post
No activity results to display
Show More
Working...