Skip to content

Instantly share code, notes, and snippets.

@franzwong
Created December 3, 2017 09:36
Show Gist options
  • Save franzwong/5a4f5b79ac26bfa2230dbf280de416d0 to your computer and use it in GitHub Desktop.
Save franzwong/5a4f5b79ac26bfa2230dbf280de416d0 to your computer and use it in GitHub Desktop.
BinaryTreeNode
public class BinaryTreeNode<T> {
private T value;
private BinaryTreeNode<T> leftChild;
private BinaryTreeNode<T> rightChild;
public T getValue() {
return value;
}
public void setValue(T value) {
this.value = value;
}
public BinaryTreeNode<T> getLeftChild() {
return leftChild;
}
public void setLeftChild(BinaryTreeNode<T> leftChild) {
this.leftChild = leftChild;
}
public BinaryTreeNode<T> getRightChild() {
return rightChild;
}
public void setRightChild(BinaryTreeNode<T> rightChild) {
this.rightChild = rightChild;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment