反向抛光 [英] Reverse polish
问题描述
嗨
任何人都知道如何将括号中的布尔表达式转换为反向
抛光?
干杯
Hi
Anyone know how to convert a bracketed boolean expression into reverse
polish?
Cheers
推荐答案
Steve Lambert< st *********** @ ntlworld.com>潦草地写道:
Steve Lambert <st***********@ntlworld.com> scribbled the following:
嗨
任何人都知道如何将括号内的布尔表达式转换为反向
抛光?
Hi Anyone know how to convert a bracketed boolean expression into reverse
polish?
这是一个算法问题,更适合comp.theory。通过将表达式解析为树,然后按照深度顺序将其
节点附加在一起,我就可以了。
。
>
-
/ - Joona Palaste(pa*****@cc.helsinki.fi)-------------芬兰 - ------ \
\ -------------------------------- ------------------------规则! -------- /
冰淇淋销售不知何故导致溺水:两者都发生在夏季。
- Antti Voipio& Arto Wikla
That''s an algorithm question and better suited to comp.theory. I''d go
about it by parsing the expression into a tree and then appending its
nodes together in a depth-wise order.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Ice cream sales somehow cause drownings: both happen in summer."
- Antti Voipio & Arto Wikla
>这是一个算法问题,更适合comp.theory。
同上。
你会找到你需要的东西开始使用Algorithms in C,
作者:Robert Sedgewick。
> That''s an algorithm question and better suited to comp.theory.
Ditto.
You''ll find what you need to get started in "Algorithms in C",
by Robert Sedgewick.
Joona I Palaste< pa ***** @ cc .helsinki.fi>写道:
Joona I Palaste <pa*****@cc.helsinki.fi> writes:
Steve Lambert< st *********** @ ntlworld.com>潦草地写道:
Steve Lambert <st***********@ntlworld.com> scribbled the following:
你好
任何人都知道如何将括号内的布尔表达式转换为反向
上釉?
Anyone know how to convert a bracketed boolean expression into reverse
polish?
这是一个算法问题,更适合comp.theory。
That''s an algorithm question and better suited to comp.theory.
或comp.programming。
我会去它通过将表达式解析为树然后按深度顺序将其节点附加在一起。
Or comp.programming.
I''d go about it by parsing the expression into a tree and then
appending its nodes together in a depth-wise order.
同意。
>
-
Keith Thompson(The_Other_Keith) ks***@mib.org < ; http://www.ghoti.net/~kst>
圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>
我们必须做点什么。这是事情。因此,我们必须这样做。
Agreed.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
这篇关于反向抛光的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!