⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/build-your-own-graph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |