8 votes 8 votes Consider the following infix expression which is to be converted to postfix expression using stack. $$(((P+Q)*(R+S))/T)+(A*(B+C))$$ What is the size of stack? DS stack + – Lakshman Bhaiya asked Aug 4, 2017 edited Aug 8, 2021 by soujanyareddy13 Lakshman Bhaiya 3.5k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Lakshman Bhaiya commented Nov 4, 2017 reply Follow Share please, anyone, give the answer for this question 0 votes 0 votes sumit goyal 1 commented Jan 31, 2018 i moved by sumit goyal 1 Feb 2, 2018 reply Follow Share 1 :PQ , WE encounter ) after Q so pop till we get 1st ( 2 : PQ+ //STACK LOOK AS IN DIAGRAM 3 : PQ+RS after S we encounter ) , pop till you get 1st ( 4 : PQ + RS + now we encounter second ) after S so pop till you got 1st ( 5 : PQ+RS+ $*$ //stack look as in diagram 6 : PQ+RS+ $*$ T ,We encounter ) after T hence pop till you get 1st ( 7 : PQ + RS + $*$ T / , Stack becomes empty 8 : PQ + RS + $*$ T / ABC , after C we encounter ) ,pop till you got 1st ( 9: PQ + RS + $*$ T / ABC + ,we encounter second ) after C so pop till you get 1st ( 10 : PQ + RS + $*$ T / ABC + $*$ 11 : Finally + pop out and stack BECOME empty POSTFIX PQ + RS + $*$ T / ABC + $*$ + size of stack = 5 6 votes 6 votes Please log in or register to add a comment.