Programming assignment for Algorithms, Binary Search Tree representation of LZ encryption