lzw encoding algorithm
get the closest value of a given value in a bst