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 postFix = RPN => {
### postfixToInfix
This one has few errors and does not work properply
```js
const postfixToInfix = RPN => {
let convert = RPN.replace(/\^/g,'**').split(/\s+/g).filter(el => !/\s+/.test(el) && el !== '')
let stack = []
let result = []
@ -27,3 +32,7 @@ const postFix = RPN => {
if(result.length === 1) return result.pop()
else throw `${RPN} is not a correct RPN`
}
```
```js
```