Assume "#" is like a backspace in string. This means that string "a#bc#d" would actually be "bd".
Implement a function that will process a string...
For further actions, you may consider blocking this person and/or reporting abuse
Rust:
Too easy...
Maybe
match ch
:vWhy?
Just to show off
Scala
JavaScript with regex:
Try with
Thanks. Fixt.
Progress 4GL
Classic use case for a stack (Python).
A quick Clojure solution, leveraging a (linked) list as a stack:
JavaScript
Python – No doc strings etc., it's a challenge after all…
This is always a good idea to comment your code. Beginners trying to solve these challenges can learn a lot from veterans like you!
Here is a ugly Python one-liner using
lambda
.Use Python 3.8
Idea is based on
PHP:
Hope this is right, C++
Haskell:
Another JS solution
TypeScript