Skip to content

Instantly share code, notes, and snippets.

View bciccarelli's full-sized avatar

Benjamin Ciccarelli bciccarelli

View GitHub Profile
@bciccarelli
bciccarelli / escape.py
Created June 2, 2019 07:37
Foobar level 3 solution
import math
def solution(map):
searchMap = []
searchMap.append((0,0,0))
moves = 0
finished = False
while not finished:
[searchMap, finished] = search(searchMap, map)
moves += 1
return moves
@bciccarelli
bciccarelli / bunnyEscape.py
Created June 13, 2019 16:55
Solution for foobor 4-2
from itertools import permutations, groupby
width = 0
def solution(times, time_limit):
global width
width = len(times)
numBunnies = width - 2
full = [i for i in range(width)]
fullBunnies = full[:-2]
fullBunniesIndex = [i+1 for i in fullBunnies]
if(negativeCycles(times)):