Given an element x, task is to find the value of its immediate smaller element.
Let res be the resultant node.
Initialize the resultant Node as NULL.
For every Node, check if data of root is greater than res, but less than x. if yes, update res.
Recursively do the same for all nodes of the given Generic Tree.
Return res, and res->key would be the immediate smaller element.
Immediate Smaller element in an N-ary Tree: https://www.geeksforgeeks.org/immediate-smaller-element-n-ary-tree/