Wow, I did not see the stack-based solution in there at all. I tried the recursive approach and then one similar to @thejessleigh
and stopped there! At least I enjoyed this one more than Day 4!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.