Saved Bookmarks
| 1. |
For the below Queue implemented using 2 Stacks. void insert(int x)push(1,x);int delete()int x;if(isEmpty(S2){if(isempty(51))printf("Empty Queue");elsewhile(lisEmpty(51)x=pop(S1);push(52,x);return pop(52);What is the number of Push and Pop operations done for the following Queve coerations?insert(1);Insert(2);delete()insert(3): |
| Answer» TION: | |