|
-
Feb 3rd, 2013, 11:35 PM
#8
Re: Flatten list problem - cannot be inferred from usage
 Originally Posted by AceInfinity
For all we know without actually seeing the tree, it could just be a leftover stump, cut down many years ago with no branches. If I was to take this analogy further, it could be a spruce tree, an apple tree, etc... There's no telling the structure of the tree, just because "it's a tree", and the same thing applies here.
If it was really complex with many branches and different numbers of branches in some areas, then he could introduce a recursive function to retrieve the items. But I still haven't gotten a clear picture of what data he's dealing with.
~Ace
Well, we know this much, because we were told at the outset:
 Originally Posted by Techno
each item has a list of other items (grandparent > parent > child > children etc...)
The code I provided will work regardless of the number of levels and there was no luck involved in that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|