We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Stacks
- Equal Stacks
- Discussions
Equal Stacks
Equal Stacks
Sort by
recency
|
1127 Discussions
|
Please Login in order to post a comment
EASY SOLUTION IN PYTHON3 WITH TWO APPROACHES
JavaScript (Node.js) Solution
I am not getting why it is showing wrong answer for some test cases
class stck{ public: int sum; vector* ptr; };
int equalStacks(vector h1, vector h2, vector h3) { stck* s1,*s2,*s3; s1=new stck; s2=new stck; s3=new stck; long long sm=0; for(int i=0;isum=sm; s1->ptr=&h1; sm=0; for(int i=0;isum=sm; s2->ptr=&h2; sm=0; for(int i=0;isum=sm; s3->ptr=&h3; int i,j,k; i=0,j=0,k=0;
}