NeetCode #460LC-1457MediumTrees
← Back to All Problems#460 · #1457 · Pseudo-Palindromic Paths in a Binary Tree(二叉树中的伪回文路径)
📌 Problem Statement & Constraints
Given the root of a binary tree where node values are digits
1..9, a path is pseudo-palindromic if at most one digit appears an odd number of times along it. Return the number of pseudo-palindromic paths from root to leaf. Constraints: the number of nodes is in [1, 10^5], 1 <= Node.val <= 9.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!