postfix-notation Questions

2

Solved

Given the infix expression -190 + 20, what would the correct result look like as RPN? -190 + 20 == -190 20 + ? or.. -190 + 20 == 190 - 20 + ? Are the rules for unary operators (negative) the same a...
Disputation asked 17/11, 2020 at 1:17

3

Solved

I am looking for algorithm postfix to infix notation which will produce the minimum number of the parentheses. I have found that but it will produce many, many parentheses: http://tajendrasengar....
Manouch asked 3/4, 2013 at 6:59

2

Solved

Background: In traditional Reverse Polish Notation, all operators must have fixed lengths, which allows RPN to be easily evaluated and manipulated by code because every token, expression, and subex...

1

Solved

Let's say I have my %foo; Can I set keys foo, bar, baz to a b c by taking a slice and doing parallel assignment with postfix notation? %foo->@{qw/foo bar baz/} = qw/a b c/ I used this synt...
Violist asked 15/4, 2020 at 20:13

2

I was asked to convert 7-2+3 into post fix notation while no operator precedence or left to right or right to left was mentioned in the question and then I had to make tree using translation scheme...
Belted asked 24/3, 2019 at 18:51

2

Solved

I want to generate in Python all possible RPN (Reverse Polish notation) expressions, that use letters from an input list (such as ['a', 'b', 'c']) and contain operators ['+', '-', '*', '/']. My id...
Standice asked 27/1, 2019 at 0:25

2

Solved

so i have a binary tree and a postfix expression "6 2 * 3 /" what is the algo to put it in a tree? like, [/] / \ [*] [3] / \ [6] [2]
Loralyn asked 4/12, 2011 at 14:16

5

Solved

By use I mean its use in many calculators like HP35- My guesses (and confusions) are - postfix is actually more memory efficient -( SO post comments here ). (confusion - The evaluation algorit...

1

Solved

I'm trying to convert python math expressions to postfix notation using the AST python module. Here's what I got so far: import parser import ast from math import sin, cos, tan formulas = [ "1+2...

4

What would be a good way to evaluate a string(array, something) that contains a postfix expression(ex: 3 5 +) to check for validity?
Rattat asked 25/4, 2009 at 22:28

2

Can this postfix expression can be evaluated? 6 2 3 + - 3 8 2 / + * 2 5 3 +
Homesteader asked 30/10, 2016 at 12:15

3

Ok so I have to read in a postfix expression from a file. The postfix expression must have spaces to separate each operator or operand. What I have so far works only if there is no spaces between t...
Does asked 4/9, 2012 at 18:16

2

I was expecting the following snippet: var = "Not Empty" unless defined? var var # => nil to return "Not Empty", but I got nil. Any insight into why this is happening?
Planetary asked 29/9, 2015 at 8:3

1

Solved

Given an input like this: 3+4+ Algorithm turns it in to 3 4 + + I can find the error when it's time to execute the postfix expression. But, is it possible to spot this during the conversion? (Wi...
Burkley asked 5/5, 2013 at 0:29

1

Solved

I am trapped at work with a locked down pc. But I am trying to practice my Scala. I am using Ideone.com since I can't even install scalac... Anyway this is not compiling: class DPt(var name: Stri...
Costanzo asked 18/5, 2012 at 16:59

4

Solved

I've been looking at the wiki page: http://en.wikipedia.org/wiki/Shunting-yard_algorithm I've used the code example to build the first part, basically I can currently turn : 3 + 4 * 2 / ( 1 - 5 ...
Proto asked 1/12, 2011 at 16:8

6

Solved

I'm in love with Ruby. In this language all core functions are actually methods. That's why I prefer postfix notation – when the data, which I want to process is placed left from the body of anonym...
Gera asked 17/8, 2011 at 15:38

5

Solved

I'm writing what might not even be called a language in python. I currently have several operators: +, -, *, ^, fac, @, !!. fac computes a factorial, @ returns the value of a variable, !! sets a va...

3

Solved

Since this question is about the increment operator and speed differences with prefix/postfix notation, I will describe the question very carefully lest Eric Lippert discover it and flame me! (fur...
Bismuthinite asked 20/5, 2011 at 17:17

3

Solved

Here is a Python postfix notation interpreter which utilizes a stack to evaluate the expressions. Is it possible to make this function more efficient and accurate? #!/usr/bin/env python import ...
Arcuate asked 5/10, 2010 at 16:59

2

Solved

The following class is used by another program. When it is accessed, it throws a StackOverFlowError. This is part of a Postfix Calculator I have to do as a project at my university. Any help woul...
Renaterenato asked 10/3, 2010 at 20:26

4

Solved

I've been mulling over creating a language that would be extremely well suited to creation of DSLs, by allowing definitions of functions that are infix, postfix, prefix, or even consist of multiple...
1

© 2022 - 2025 — McMap. All rights reserved.