Count Paths That Can Form a Palindrome in a Tree
CodingOnline Assessment, PhoneSoftware EngineerReported Apr, 2026Medium Frequency
Company question banks are included with the Insider plan.
You are given a 0-indexed tree with n nodes represented by a parent array parent, where parent[0] = -1 and parent[i] is the parent of node i for i > 0.
You are also given a string s of...