answer for singleNumber and depthOfBinaryTree