Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Ciccarelli bciccarelli

View GitHub Profile
@bciccarelli
bciccarelli / bunnyEscape.py
Created Jun 13, 2019
Solution for foobor 4-2
View bunnyEscape.py
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)):
@bciccarelli
bciccarelli / escape.py
Created Jun 2, 2019
Foobar level 3 solution
View escape.py
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