can any one give a slight hint about the alogirthm to evaluate a prefix expression using queue.i tried a lot bt now atthe dead end,
Jump to Post
*+abc should be treated as (a+b)*c so in a prefix expression traverse the expression until you find two operands after an operator and use that operator on that operand then go on doing the same thing for the rest of expression. If you know queue then you can obviously play …
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.