Skip to content

Instantly share code, notes, and snippets.

@john-nash-rs
Last active February 8, 2019 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save john-nash-rs/5aa5509c21f61f2db24fde24f1dd7366 to your computer and use it in GitHub Desktop.
Save john-nash-rs/5aa5509c21f61f2db24fde24f1dd7366 to your computer and use it in GitHub Desktop.
/**
* Node of the Binary Tree
*/
public class Node {
private Integer data;
private Node left;
private Node right;
public Integer getData() {
return data;
}
public void setData(Integer data) {
this.data = data;
}
public Node getLeft() {
return left;
}
public void setLeft(Node left) {
this.left = left;
}
public Node getRight() {
return right;
}
public void setRight(Node right) {
this.right = right;
}
public Node(Integer data, Node left, Node right) {
this.data = data;
this.left = left;
this.right = right;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment