Given a string contaning only a, b and c, remove all b and ac.
removeChars('ab') // 'a'
removeChars('abc') // ''
removeChars('cabbaabcca') // 'caa'
```javascript
/**
* @param {string} input
* @returns string
*/
function removeChars(input) {
let stack = []
for(let i = input.length-1; i>=0; i--){
if(input[i] === "a" && stack[0] === "c"){
stack.shift()
} else if(input[i] !== "b"){
stack.unshift(input[i])
}
}
return stack.join("")
}
```