Asked • 03/15/19

Java tree data-structure?

Is there a good available (standard Java) data structure to represent a tree in Java? Specifically I need to represent the following: - The tree at any node can have an arbitrary number of children - Each node (after the root) is just a String (whose children are also Strings) - I need to be able to get all the children (some sort of list or array of Strings) given an input string representing a given nodeIs there an available structure for this or do I need to create my own (if so implementation suggestions would be great).

1 Expert Answer

By:

Patrick B. answered • 03/17/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.