Skip to content

Instantly share code, notes, and snippets.

View NoahNelson's full-sized avatar

Noah Nelson NoahNelson

View GitHub Profile
@NoahNelson
NoahNelson / WordRectangle.py
Created August 29, 2016 19:56
Python solution to Cracking the Coding Interview Question 17.25 - Word Rectangle
### WordRectangle.py
### Python solution to Cracking the Coding Interview's question 17.25
### Noah Nelson
###
### The problem:
### Given a dictionary or list of words, return the largest rectangle you can
### form out of those words where every row and every column is a valid word.
### All of the rows have to have the same length, and all of the columns,
### but the width and height may be different. The largest rectangle is the
### one with the largest area.