2 ms·
Looking For Good Resources to Create a Tree Data Structure in Java
In Java, I can make a binary tree, a doubly or singly linked list, and store in values through recursion.
I'm looking for a way to create a tree with an unlimited amount of children for each node (as opposed to 1, with the Linked List, or 2, with the binary tree).
I'm going to use the ArrayList class to store the children of each parent, but am having trouble understanding how to code it up.
Does anybody have an example of such a tree that I could look at?
Thanks.