Input: {-1}, Expected o/p: {-1}, Actual o/p: -1


  • 0
    P

    Any guesses on what does this mean? This is how my cloned graph structure looks like:

    141     clone = cloneGraph(n0);
    142     cout << "------------------" << endl;
    143     cout << clone << endl;
    144     cout << clone->label << endl;
    145     cout << clone->neighbors.size() << endl;
    146     cout << "------------------" << endl;
    
    ------------------
    0xc82130
    -1
    0
    ------------------
    

    And it looks correct to me? Do you guys see any problem? Please note that the code I am submitting to the leetcode does not cout anything. I have put the above couts just for debugging.

    Thanks.


  • 0
    S

    You don't have to cout anything.


  • 0
    P

    Those couts are just for debugging.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.