You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Shunting Yard/README.markdown
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Any mathematics we write is expressed in a notation known as *infix notation*. F
6
6
7
7
The operator is placed in between the operands, hence the expression is said to be in *infix* form. If you think about it, any expression that you write on a piece of paper will always be in infix form. This is what we humans understand.
8
8
9
-
Multiplication has higher precedence than addition, so when the above expression is evaluated you would first multiply **B** and **C**, and then add the result to **A**. We humans can easily understand the precedence of operators, but a machine needs to be given instructions about each operator.
9
+
Multiplication has higher precedence than addition, so when the above expression is evaluated you would first multiply **B** and **C**, and then add the result to **A**. We humans can easily understand the precedence of operators, but a machine needs to be given instructions about each operator.
10
10
11
11
To change the order of evaluation, we can use parentheses:
12
12
@@ -108,4 +108,5 @@ We end up with the postfix expression:
108
108
109
109
[Shunting yard algorithm on Wikipedia](https://en.wikipedia.org/wiki/Shunting-yard_algorithm)
110
110
111
-
*Written for the Swift Algorithm Club by [Ali Hafizji](http://www.github.com/aliHafizji)*
111
+
*Written for the Swift Algorithm Club by [Ali Hafizji](http://www.github.com/aliHafizji)*
0 commit comments