You are viewing a single comment's thread. Return to all comments →
i couldnot understand this line
else if(type == 3){ // print maximum cout << maxStack.top() << endl; }
it is supposed to print top element and not maximum so how it is passing the test case???
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Element
You are viewing a single comment's thread. Return to all comments →
i couldnot understand this line
else if(type == 3){ // print maximum cout << maxStack.top() << endl; }