----------------This function is used to push elements into stack 1--------------------------*/
| 14 | |
| 15 | /*----------------This function is used to push elements into stack 1--------------------------*/ |
| 16 | void push_1(int data){ |
| 17 | |
| 18 | if(top_1 < top_2 - 1){ |
| 19 | arr[++top_1] = data; |
| 20 | } |
| 21 | |
| 22 | else |
| 23 | cout << "Stack Overflow Error" << endl; |
| 24 | } |
| 25 | |
| 26 | |
| 27 | /*------------This function is used to push elements in stack 2-------------------------------*/ |