For non perfect binary tree