Given a tree with n (n >0 ) nodes where, every node has a list of key-value pairsReport
Please briefly explain why you feel this question should be reported .
Given a tree with n (n >0 ) nodes where, every node has a list of key-value pairs , with following properties:
1) child node will inherit key-value pair from its parent.
2) child node can override key-value pair at parent by creating a replica. You have to print the flattened key-values pairs at given node say m. 1 <= m <= n Given a key value pair , print all nodes that satisfies this condition.
Example Input: n = 5 , m= C
A [ (name : abc), (id:5), (place:Tirupati) ]
/ B [ (id : 24), ( name : efg) ]
/ \ [(name : xyz) ] C D [(place : Bangalore)]
Output: [(name: xyz), (id:24), (place : Tirupati)]