You are viewing a single comment's thread. Return to all comments →
it's working fine. just a little mistake!
if(type==1) { cin>>x; if(top==-1) stack[++top]=x; else { stack[top+1]=max(stack[top],x); ++top; }
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 →
it's working fine. just a little mistake!