Ad
  • Custom User Avatar

    A couple obvious issues here with my own solution. First is that by using reduce I'm not actually breaking out the loop when I detect a closing paren that came before an open paren. This means the the code will run longer than necessary. Also, because I used an arbitrarily large number '100000' to handle this situation, there is the SLIGHT possibility that I could get a false positive.