Re: Modified Preorder Tree Traversal - Advanced question
Let me clarify a few more things.
There is NO given starting region, just a zoomlevel to go by. You could assume the root region as the "starting point"
Let me expand the test data to make it a bit better, I oversimplified a bit.
.....................................Root(15)...............................
................UK(5)............................... US (7) ...............
..Scotland(3)....England(4)......Texas(6)......Conneticut(3)...
.......................Surrey(1).......Dallas(4).......Hartford(2).....
Notice that texas is zoom 6, and UK is zoom 5.
Variables to be used:
zoomlevel
entrypoint (eg "Root" or "UK") - I would settle for this being hard-wired as the root. As it is my table's root is always region 1 anyway.
Return the regions that are a child of entrypoint and with a zoom <= zoomlevel
BUT ONLY THE FIRST ONE, NOT ALL CHILDREN.
Examples (all using root as the entrypoint)
Zoomlevel : Result
14 : UK, US
7 : UK, US
6 : UK, Texas, Conneticut
5 : UK, Dallas, Conneticut
4 : Scotland, England, Dallas, Conneticut
3 : Scotland, Surrey, Dallas, Hartford
2 : Scotland, Surrey, Dallas, Hartford
Thanks for the help !