Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| /* | |
| Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. | |
| For "(()", the longest valid parentheses substring is "()", which has length = 2. | |
| Another example is ")()())", where the longest valid parentheses substring is "()()", which has length = 4. | |
| Algorithm time complexity is O(n), and space complexity is O(n) | |
| Basic algrithm is to keep track of the longest matched paramthesis. | |
| But we need to separate the valid substring, which have 2 special cases: ())()() and ()()(((), and others(whole string |
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/build-your-own-graph |