What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-25 20:05:04
kitty's calculations on a tree hackerrank solution
from collections import Counter, defaultdict MOD = 10**9 + 7 def read_row(): return (int(x) for x in input().split()) def mul(x, y): return (x * y) % MOD def add(*args): return sum(args) % MOD def sub(x, y): return (x - y) % MOD n, q... Add solution -
Other 2021-09-26 04:15:06
A* Algorithm for TSP
def aStarAlgo(start_node, stop_node): open_set = set(start_node) closed_set = set() &... Add solution