To check if all the leaf nodes are at the same level in a binary tree, we can use a pre-order traversal approach.Start by visiting the left leaf and update the level value.Then, check the right leaf and compare the level values.If both levels are the same, return true; otherwise, return false.