Skip to content

Instantly share code, notes, and snippets.

View BraedenYoung's full-sized avatar

Braeden Young BraedenYoung

View GitHub Profile
@BraedenYoung
BraedenYoung / sumOfTwo.js
Created August 2, 2017 00:40
Sum From Two Arrays
/*
* 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});
}
@BraedenYoung
BraedenYoung / simple_led.ino
Created December 19, 2016 18:41
Simple sketch to light up Neopixels
#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
from termcolor import cprint
SAMPLES = """
5
"""
def part_one(input):