1457. Pseudo-Palindromic Paths in a Binary Tree
https://leetcode.com/problems/pseudo-palindromic-paths-in-a-binary-tree
Description
Given a binary tree where node values are digits from 1 to 9. A path in the binary tree is said to be pseudo-palindromic if at least one permutation of the node values in the path is a palindrome.
Return the number of pseudo-palindromic paths going from the root node to leaf nodes.
Example 1:
Example 2:
Example 3:
Constraints:
The number of nodes in the tree is in the range
[1, 105]
.1 <= Node.val <= 9
ac
Previous1456. Maximum Number of Vowels in a Substring of Given LengthNext1458. Max Dot Product of Two Subsequences
Last updated