public static List < ITree > preOrder ( ITree tree ) { List < ITree > trees = new ArrayList <> ( ) ; preOrder ( tree , trees ) ; return trees ; }
Returns a list of every subtrees and the tree ordered using a pre - order .