I've done the ol' parenthesis match problem with a stack before, and I even remembered that problem when I saw this: "Oh hey, this looks like that one problem I solved with a stack. I should arbitrarily use a linked list here!"
The linked list turned out ok, but I could have saved a couple lines and had a much more coherent solution if I used the stack.
Ah well, c'est la vie.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've done the ol' parenthesis match problem with a stack before, and I even remembered that problem when I saw this: "Oh hey, this looks like that one problem I solved with a stack. I should arbitrarily use a linked list here!"
The linked list turned out ok, but I could have saved a couple lines and had a much more coherent solution if I used the stack.
Ah well, c'est la vie.