Done for binary tree