September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -9,7 +9,11 @@ public class ShuntingYard {
|
|||
}
|
||||
|
||||
static String infixToPostfix(String infix) {
|
||||
/* To find out the precedence, we take the index of the
|
||||
token in the ops string and divide by 2 (rounding down).
|
||||
This will give us: 0, 0, 1, 1, 2 */
|
||||
final String ops = "-+/*^";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Stack<Integer> s = new Stack<>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue