Skip to content

Instantly share code, notes, and snippets.

View sahibjotsaggu's full-sized avatar
🎯
Focusing

Sahibjot Saggu sahibjotsaggu

🎯
Focusing
View GitHub Profile
expr = inp.split('\n')
# PART 1
# expr is a simple expression that has no parentheses
def evaluate(expr, part=1):
if part == 2:
if expr.find('(') > -1:
return [str(eval(expr))]
else:
let input1 = ``;
let input = input2.split("\n");
function dec2bin(dec) {
return (dec >>> 0).toString(2);
}
function part1() {
const mem = {};