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
#!/usr/bin/env python | |
import unittest | |
def evalutate_expr(expr: str) -> bool: | |
expr = expr.replace("true", "True").replace("false", "False").replace("xor", "!=") | |
return eval(expr) | |
def get_variants(expression): | |
tokens = expression.split(" ") |
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
const Fibonacci = (index) => { | |
const fibIteration = (last, beforeLast, indexCount) => | |
indexCount === 0 | |
? beforeLast | |
: fibIteration(last + beforeLast, last, indexCount - 1); | |
return fibIteration(1, 0, index); | |
}; |
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
{"lastUpload":"2020-06-26T04:20:27.675Z","extensionVersion":"v3.4.3"} |