Solution to binary-search-tree-check
Optimizing search tree