Skip to content

Instantly share code, notes, and snippets.

View nickstanisha's full-sized avatar

Nick Stanisha nickstanisha

View GitHub Profile
@nickstanisha
nickstanisha / scrabble_riddler.ipynb
Created October 22, 2016 20:01
A notebook that finds the longest possible scrabble word, built one letter at a time from smaller valid scrabble words.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickstanisha
nickstanisha / river_DFS.ipynb
Last active January 24, 2016 20:19
This notebook performs repeated Depth First Searches to estimate answers to this week's FiveThirtyEight riddle (see here: http://fivethirtyeight.com/features/night-falls-a-storm-rolls-in-can-you-cross-the-river/)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickstanisha
nickstanisha / trie.py
Created November 21, 2015 22:58
An object-oriented implementation of a "Trie" in Python
class Node:
def __init__(self, label=None, data=None):
self.label = label
self.data = data
self.children = dict()
def addChild(self, key, data=None):
if not isinstance(key, Node):
self.children[key] = Node(key, data)
else: