What is the optimal (easy to maintain, reasonably fast, robust) implementation of tree-like data structure with three levels?
I would like to use Dictionary or SortedDictionary, because all values (nodes have unique key).
The first level is supposed to have about 300 items, every of these zero to tens (hardly more than 100, usually less than 10) items on second level and about ten on third level. Levels two and three are closely connected so they should be probably represented by a single object. All the relations are 1:n
++-L1
|++-L2
||+--L3
||+--...1 to 10 L3 items for each L2
||+--L3
|+--L2
|+--...0 to 100, usually <10 L2 items for each L1
|+--L2
+--L1
+--L1
+--...about 300 L1 items
+--L1
Is it better to create a dictionary in every 1st level object containing level2 objects (a real tree) or is it better to put all 2nd level objects into a single directory?
The objects are not very big, they contain only some strings and numbers. The application is supposed to be standalone (not needing any sql server or so)
Or is object representation a wrong choice and I should go for something totally different?