int pop() {
if(isEmpty(top))
{
cout << "Stack underflow << endl;
return -1;
}
else
{
Node* n = top;
int x = n->data;
top=top->next;
free(n);
return x;
}
}
class Solution { public int removeDuplicates ( int [] nums ) { // base case: return if array have no el. if ( nums...
No comments:
Post a Comment