Created
June 30, 2015 17:23
-
-
Save calindotgabriel/3f8919278206ff1a9d45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tree; | |
/** | |
* Created by motan on 27.06.2015. | |
*/ | |
public class TreeNode<T> { | |
public T data; | |
public BinaryTree<T> leftTree, rightTree; | |
public TreeNode(T data, BinaryTree<T> left, BinaryTree<T> right) { | |
this.data = data; | |
this.leftTree = left; | |
this.rightTree = right; | |
} | |
public TreeNode(T data) { | |
this.data = data; | |
} | |
@Override | |
public String toString() { | |
return "TreeNode{" + | |
"data=" + data + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment