Last active
February 8, 2019 13:33
-
-
Save john-nash-rs/5aa5509c21f61f2db24fde24f1dd7366 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* 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