Skip to content

Instantly share code, notes, and snippets.

@gweakliem
gweakliem / IntTree.py
Created October 28, 2016 01:00
From a coding interview I did. The problem was to come up with an encoding for a tree of integers
'''Problem: come up with an encoding for a tree of integers.
Tree representing
1
/|\
2 3 4
/\ |\
5 6 9 11
/\ \
7 8 10