Monday, December 18, 2017

Leetcode 32: Longest Valid Parentheses (I)

Dec. 18, 2017 


Introduction


Longest valid parentheses is the hard level algorithm and is one of Leetcode algorithms. 

Back to January 2016, I did not know that Leetcode discussion panel has so many solutions. I always tried to google and found the solutions. Here are my favorites back in 2016. 

Code study 


A Chinese blog with more than 8,000 views. The link is here

To learn the algorithm, in case the study blog may be retired some day,  I start to put analysis in my gist as well, the link is here. The Java code is here


Actionable Items



Review more blogs:

http://bangbingsyb.blogspot.ca/2014/11/leetcode-longest-valid-parentheses.html

http://shanjiaxin.blogspot.ca/2014/04/longest-valid-parentheses-leetcode.html

Julia C# practiced the algorithm in January 2016, here is the code.  



No comments:

Post a Comment