Skip to main content

Tenda ac21 unboxing and user experience ||

Comments

  1. Bellman ford's Algorithm
    #include
    using namespace std;
    #define INF 0x3f3f3f3f
    const int N=1e5+10;
    typedef pair ipair;
    vectoradj[N];

    void shortestpath(int s,vector >adj[],int ver){
    priority_queue,greater >pq;
    vectordist(N,INF);
    pq.push({0,s});
    dist[s]=0;
    while(!pq.empty()){
    int u=pq.top().second;
    pq.pop();
    vector >::iterator it;
    for(int i=1;i>ver;
    cout<<"Enter the edges:";
    cin>>edges;
    for(int i=1;i<=edges;i++){
    int x,y,z;
    cin>>x>>y>>z;
    adj[x].push_back({y,z});
    }
    int src;
    cout<<"Enter the source vertex:";
    cin>>src;
    shortestpath(src,adj,ver);
    }

    ReplyDelete

Post a Comment

Popular posts from this blog

Total Dhamaal full movie drive link

Hellow brother, Still you are searching for Total dhamaal movie ? Don't worry where MST360Degree is here. Now you can watch or download Total dhamaal movie from my blog. just click on the dhamaal movie image.Thank you....

Dr driving hack mod apk download unlimited gold all car free

For Full movie Click Here