DEV Community

Cover image for A Tale of Two Functions

A Tale of Two Functions

Ben Lovy on December 06, 2018

In Which Ben Learns 1 Is The Loneliest Number So, my biggest shortcoming as a developer is my toolkit of algorithms at my fingertips by ...
Collapse
 
thejoezack profile image
Joe Zack

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.

Collapse
 
deciduously profile image
Ben Lovy

Nice and concise! rxjs looks great, I should give it a look.

 
deciduously profile image
Ben Lovy

All signs keep pointing here. Guess I gotta go :)