Ishq

Would you make a Polish (prefix) Notation Math program using stack in C#?

I would like you to perform Polish Notation Math. I have produced a list of math problems, simple ones, but, they will require you to use two stacks to make them work. You are to break them down into two stacks, one is the numbers and the other being the operation. Pop from the operations stack and perform the math.

KEEP IN MIND THE ORDER OF OPERATIONS IS VERY IMPORTANT, AND YOU MIGHT WANT TO BUILD A METHOD TO INDICATE SUCH. THIS WILL SAVE YOU A LOT OF MISERY.

Another point you should keep in mind, it is not about the answer it is about the process. And if you can do stacks, which I have always found exceedingly utilitarian, you can do queues.

DON'T USE DICTIONARIES LIST OR ARRAYS ONLY. AND WRITE A PROCESS FOR POPPING AND PUSHING FROM THE STACK, IN PYTHON IT HAS A PREDEFINED METHOD FOR THIS, DON'T USE IT, WRITE YOUR OWN


https://www.tutorialspoint.com/data_structures_algorithms/expression_parsing.htm

Question Attachments

2 attachments —

Pending
Other / Other
21 Sep 2018
Due Date: 24 Sep 2018

Report As Dispute

Share Your Feedback

Give Review : A+ A B C D F