Skip to content

Instantly share code, notes, and snippets.

View damzam's full-sized avatar

David Morton damzam

View GitHub Profile
@damzam
damzam / cheapest_path.py
Created June 14, 2015 05:21
Use dynamic programming to find the shortest path through nodes in a binary lattice structure
"""
Figure out the smallest sum for a binary lattice
of nodes where children are shared.
e.g.
1
/ \
4 5
/ \ / \

Keybase proof

I hereby claim:

  • I am damzam on github.
  • I am dmorton (https://keybase.io/dmorton) on keybase.
  • I have a public key ASBL4_oC6IYBJBjG_3FhblZP1R0LDof0wjP6huHis6TnpQo

To claim this, I am signing this object: