working brute force for full-binary-tree