give binary tree node value digit 1 9 a path binary tree say pseudopalindromic permutation node value path palindromereturn number pseudopalindromic path go root node leaf node example 1input root 23131null1output 2 Explanation the figure represent give binary tree there path go root node leaf node red path 233 green path 211 path 231 among path red path green path pseudopalindromic path red path 233 rearrange 323 palindrome green path 211 rearrange 121 palindromeExample 2input root 21113nullnullnullnullnull1output 1 Explanation the figure represent give binary tree there path go root node leaf node green path 211 path 2131 path 21 among path green path pseudopalindromic 211 rearrange 121 palindromeExample 3input root 9output 1 ConstraintsThe number nod tree range 1 1051 Nodeval 9