Is there any inbuilt data structure that we can use for tree implementation?
Tree Data-Structure
As mentioned earlier, there are two variety of tree implementation in Java collection framework. One is TreeSet and another is TreeMap. They are defined in the java.util package as follows:
public class TreeSet<E>
extends AbstractSet<E>
implements NavigableSet<E>, Cloneable, Serializable
public class TreeMap<K, V>
extends AbstractMap<K, V>
implements NavigableMap<K, V>, Cloneable, Serializable
you can see this for reference