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 |
| Pail example: | |
| Writejob: Partition numbers [1..100] into two directories - belowfifty & abovefifty. | |
| Further, create 7 subdirectories under each, based on number mod 7. | |
| So a number like 62 would end up in the location "abovefifty/6". | |
| Readjob: Read the subdirectories "belowfifty/3" & "abovefifty/0" | |
| RESULTS: | |
| $ tree pailtest |
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/build-your-own-graph |