A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Finding the leaf nodes in a tree data structure
Joined: Jul 27, 2010
Mar 25, 2013 08:32:38
How do I go about finding all the leaf nodes in a Tree data structure? My way would be to use a
and find all the nodes for which nextNode value is null. Is there a data structure that is specifically designed for this sort of thing?
Joined: Feb 07, 2005
Mar 25, 2013 08:36:10
I would try recursion.
Joined: Oct 13, 2005
Mar 25, 2013 09:33:57
Do your nodes not have an
I agree. Here's the link:
subject: Finding the leaf nodes in a tree data structure
Help me in choosing a pattern
JTree reload question, AGAIN
tree not getting updated on Linux ??
how can I change this tree with different Icons for Different nodes at Run Time
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014