Skip to content
Gupern's Blog

Gupern's Blog

You need not to be a poet to poetize.

  • Introduction
  • Science
    Science & Technology
  • Art

Categories

  • Art (58)
  • blockchain (4)
  • Book Review (11)
  • Database (11)
  • Finance (2)
  • IT (60)
  • Life Flow (25)
  • Mathematics (3)
  • Python (24)
  • Science (37)
  • Uncategorized (1)
  • Unix/Linux (5)

Tag: 计算机组成原理

python实行栈的括号处理算法

问题描述

“+”代表AND,“|”代表OR,如何基于这个两个运算符号写个类似四则运算优先处理“()”内的逻辑?
A+B代表A and B;没毛病
A|B代表A或B;没毛病
很简单对吧?
那么((A+B)|C)+(D|(E+F))
(((A+B)|C)+(D|(E+F)))l(G+H)
怎么设计程序[……]

Read more

Posted on March 14, 2018Categories IT, PythonTags python, stack, 计算机组成原理
Proudly powered by WordPress