Showing posts with label Leetcode 32: Longest Valid Parentheses. Show all posts
Showing posts with label Leetcode 32: Longest Valid Parentheses. Show all posts

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.  



Wednesday, January 20, 2016

Leetcode questions 20: Valid Parentheses

January 20, 2016 

Leetcode 20: Valid parentheses


Julia’s C# code:

January 20, 2016

favorite blogs to read: January 20, 2016

Great time to go over different ideas to implement the algorithm, using Map in C++, Hashmap, and see so many talents through those code - 






http://www.jiuzhang.com/solutions/valid-parentheses/

So, ready to review more about parentheses:

Leetcode 32: longest valid parentheses -

Julia’s blog on this question:
Leetcode question 22: Generate Parentheses
https://github.com/jianminchen/Leetcode_C-/blob/master/GenerateParentheses_No22.cs