I have a a tree Root / | \ V R M / | \ | \ L1 L2 Sub L6 MCon /\ L3 L4 \ L7 class Container { Id getUid() leafList getLeafs() { return leafs; } leafs } class Leave { Id getUid() } Where in the above Tree is N Ary tree Root ,V,R,C,Sub,RLcon,MCon are Containers L1,L2,L3,L4,L6,L7 are leaf nodes I have following data 1) root container pointer 2) root.getContainers - return list of sub containers - for example root.getContainers will return here V,R,and M V.getContainers will return Sub V.getLeafs will return L1,L2, I have a Create a Yaml Dump from Nested Ordered Dictionary The dump of output nested dictionaries is as follows V: UidOfL1: Name :L1 type : leafOfV UidOfL2: Name :L2 type : leafOfV UidOfSub: Name :Sub type : Container R: UidOfL6: Name :L6 type : leafOfR MCon: UidOfL7: Name :L7 type : leafOfM The algorithm has to be designed using OrederedDict of python Can someone help me to write the correct and optimized algorithm in python
U
User 12065529
@User 12065529