6 6 votes Convert the pre-fix expression to in-fix $- ^{\ast} +ABC^{\ast} – DE+FG$ $(A-B)^{\ast}C+(D^{\ast}E)-(F+G)$ $(A+B)^{\ast}C-(D-E)^{\ast}(F+G)$ $(A+B-C)^{\ast}(D-E)^{\ast}(F+G)$ $(A+B)^{\ast}C-(D^{\ast}E)-(F+G)$ Data Structures isro-2020 data-structures infix-prefix normal + – Satbir 6.3k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Raksha Tripathi commented Mar 28, 2022 reply Follow flag Option b is correct 0 0 replyShare gatecse commented Dec 21, 2022 reply Follow flag There was a typo in the official question paper for option B which is fixed now. 0 0 replyShare Kiyoshi commented Apr 6, 2023 reply Follow flag From right to left scan – $- * + ABC * -DE \overbrace{+FG}$ $- * + ABC * –DE \overbrace{(F+G)}$ $- * + ABC * \overbrace{(D-E)} \overbrace{(F+G)}$ $- * + ABC \overbrace{(D-E)*(F+G)}$ $- * \overbrace{(A+B)}C \overbrace{(D-E)*(F+G)}$ $- \overbrace{(A+B)*C} \overbrace{(D-E)*(F+G)}$ $ \overbrace{(A+B)*C-(D-E)*(F+G)}$ 8 8 replyShare goku4199 commented Oct 23, 2025 reply Follow flag Ans 0 0 replyShare Please log in or register to add a comment.
6 6 votes $\underline{\textbf{Answer:}\Rightarrow}\;\text{Option B}$ $\mathbf{((A+B)*C)-((D-E)*(F+G)))}$ `JEET answered Jan 13, 2020 • edited Dec 21, 2022 by gatecse `JEET comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote Infix should be: (((A+B)*C)-((D-E)*(F+G))) I have tried it here: https://ide.geeksforgeeks.org/0C6l9aF7gd Code source: https://www.geeksforgeeks.org/prefix-infix-conversion/ smsubham answered Jan 20, 2020 • edited Dec 21, 2022 by gatecse smsubham comment Share Follow See 1 comment 1 1 comment reply mrinmoyh commented Jan 22, 2020 reply Follow flag smsubham How to calculate infix here ?? what I did was - reverse the expression, so it becomes postfix expression and then evaluate the postfix expression, thus we'll get a tree. Now do a Inorder traversal on that tree to get Infix expression. likewise I'm getting - [(G+F) * (E-D)] - [C * (B+A)] 0 0 replyShare Please log in or register to add a comment.
1 1 vote Just scan the operands from right to left and try to keep inside parantheses and update the parentheses as per requirement . Step1 : (F+G) Step2:(D-E) (F+G) Step3:((D-E)*(F+G)) Step4:(skip C for now as we don't get any operator for the consecutive operands i.e. for BC) Final Step:((A+B)*C)-((D-E)*(F+G)) Hence , Option B is correct. ShubhamKumar7352 answered Dec 20, 2022 ShubhamKumar7352 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Ans goku4199 answered Oct 23, 2025 goku4199 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes When (A+B) is done and we get *(A+B) C. ..treat (A+B) as one operand. and c is another......so it will be (A+B) * CFinal Answer is B. shantanu.mishra00 answered Aug 13 shantanu.mishra00 comment Share Follow 0 reply Please log in or register to add a comment.