Skip to content

Instantly share code, notes, and snippets.

View bumsyalao's full-sized avatar

Bunmi Alao bumsyalao

View GitHub Profile
@dogoyaro
dogoyaro / anagram.py
Created June 17, 2019 05:31
This is a python script I wrote to beat my friend at the anagram game on Imessage. It uses cool stuff like binary search and finding all substrings given a string
import math
from itertools import permutations
# Find or create a dictionary file that will be cross-referenced to match possible words
words = open("/usr/share/dict/web2", 'r').readlines()
words = [word.lower() for word in words]
def compose(top, val):