Company: StateStreet_18oct
Difficulty: medium
Sum of Palindromes in Binary Tree Problem Description Given a binary tree with N nodes, add up every palindrome number that can be formed from the following node groupings: Left node - Parent - Right node Left node - Parent (if the Right child is absent) Parent - Right node (if the Left child is absent) Only a single Parent together with its Left child and Right child may ever be combined to test for a palindrome. The tree is described as a set of relationships between each node and the Root node, using strings such as L, R, LL, LR, and so on, where each string traces a path of left (L) and right (R) steps down from the Root to reach that node. 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 conta