For quite some time I found my time procastinating after getting home from work. Untill a few days ago I stumbled upon the Daily Coding Problem (DC...
For further actions, you may consider blocking this person and/or reporting abuse
In Javascript, JSON serialization/unserialization is already supported, so this felt like cheating:
Exactly man, I looked at it, and thought, what?? They're asking one thing that already exists?
The tricky part is to make it work for arbitrary values, i.e. drop the assumption the symbols for Empty_Marker and '-' are not going to be used in any node's value.
Here's such a solution in Perl, tests included:
Go solution. Its a bit verbose as it does not have optional/default params.
Here's my C# solution
Python solution using recursion.
I think this is a minimal and fast solution :
Quite impressive, thank you!
My first time to see someone using Lua, thanks for the code, cool!