flowchart TD
classDef root fill:#f96;
classDef expr fill:#ff0;
classDef leaf fill:#0f0;
A:::root
A2:::root
A3:::root
A4:::root
A5:::root
This file contains 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
int test() { | |
// initalize dp[i][0] with 1 | |
// dp[index][jumps_used] | |
result = 0; | |
for(int i = 0; i < n; ++i) { | |
for(int j = 0; j <= 3; ++j) { | |
for(int k = 1; k <= 3; ++k) { | |
if( i - k >= 0 and v[i] == v[i - k] and j - k >= 0) { | |
dp[i][j] = max(dp[i][j], 1 + k + dp[i - k][j - k)]); | |
} |
This file contains 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
#!/usr/bin/env bash | |
curlopts=( --silent --fail --max-time 10 --stderr /dev/null ) | |
keyfile='https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/builder-keys/keys.txt' | |
pubring='pubring.kbx' #may be trustedkeys.kbx on some systems | |
if [ ! -e SHA256SUMS ] || [ ! -e SHA256SUMS.asc ]; then | |
echo "missing SHA256SUMS/SHA256SUMS.asc files" | |
echo "download from https://bitcoincore.org/en/download/" | |
exit 1 |
This file contains 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
{ | |
"AN": "Andaman and Nicobar Islands", | |
"AP": "Andhra Pradesh", | |
"AR": "Arunachal Pradesh", | |
"AS": "Assam", | |
"BR": "Bihar", | |
"CG": "Chhattisgarh", | |
"CH": "Chandigarh", | |
"CHD": "Chandigarh", | |
"CT": "Chhattisgarh", |
This file contains 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
/* | |
Instructions: | |
1. Install | |
$ npm install web3 | |
$ npm install ethereumjs-wallet | |
$ npm install ethereumjs-util | |
2. Run | |
$ node app.js | |
*/ |
This file contains 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
WITH | |
RECURSIVE numbers(N) AS ( | |
SELECT 2 | |
UNION ALL | |
SELECT N + 1 FROM numbers | |
WHERE N < 1000 | |
) | |
SELECT F1.N | |
FROM numbers F1 |
This file contains 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
WITH | |
RECURSIVE fib(n, a, b) AS | |
( | |
SELECT 1, 1, 0 | |
UNION ALL | |
SELECT n + 1, a + b, a | |
FROM fib | |
WHERE n < 10 | |
) | |
SELECT a |