------------This function is used to push elements in stack 2-------------------------------*/
| 26 | |
| 27 | /*------------This function is used to push elements in stack 2-------------------------------*/ |
| 28 | void push_2(int data){ |
| 29 | |
| 30 | if(top_1 < top_2 - 1){ |
| 31 | arr[--top_2] = data; |
| 32 | } |
| 33 | |
| 34 | else |
| 35 | cout << "Stack Overflow" << endl; |
| 36 | } |
| 37 | |
| 38 | |
| 39 | /*------------This function pops the element from the stack 1----------------------------------*/ |