fixed typos

This commit is contained in:
Rohit Tanwar
2018-01-02 16:39:26 +05:30
parent f5ba3f6146
commit d69598f36a
3 changed files with 44 additions and 2 deletions

View File

@ -1,4 +1,9 @@
const infix = expr => {
### infixToPostfix
Works perfectly!
```js
const infixToPostfix = expr => {
let rpn = ''
let solve = expr.replace(/\^/g,'**').match(/([0-9]+|[\+\(\)\/\-]|\*+)/g).filter(el => !/\s+/.test(el) && el !== '')
let stack = []
@ -22,3 +27,7 @@ const infix = expr => {
}
return rpn
}
```
```js
```