Company: StateStreet_18oct
Difficulty: medium
Sum of Palindromes in Binary Tree Problem Description In a binary tree of N nodes, find the sum of all the Palindrome numbers formed by the following combination of nodes: Left node - Parent - Right node Left node - Parent (if the Right child is absent) Parent - Right node (if the Left child is absent) Only three nodes - Parent, Left child and Right child - can be combined to form the Palindrome. The tree is represented as a series of relationships of each node to the Root node such as L, R, LL, LR... and so on, where each node is left (L) to Root or left-left (LL) or right-left (RL) to Root and so on. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and testcases will fail. Constraints 3 <= N <= 100, the number of nodes in the tree Input Format The first line of input contains N, the number of nodes. The second line of input contains M, the Root node. The next N-1 lines of