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
from termcolor import cprint | |
SAMPLES = """ | |
5 | |
""" | |
def part_one(input): |
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
#include "FastLED.h" | |
// How many leds in your strip? | |
#define NUM_LEDS 60 | |
// For led chips like Neopixels, which have a data line, ground, and power, you just | |
// need to define DATA_PIN. | |
#define DATA_PIN 5 |
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
/* | |
* a: [1, 2, 3] | |
* b: [10, 20, 30, 40] | |
* v: 42 | |
*/ | |
function sumOfTwo(a, b, v) { | |
a = new Set(a); | |
return b.map((x) => { if (a.has(v - x)) return true;}).some((isValid) => {return isValid}); | |
} |