Program to find if all leaves are at same level