mirror of
https://git.adityakumar.xyz/data-structures.git
synced 2024-11-09 13:39:43 +00:00
bintree...
This commit is contained in:
parent
e326c0cd1a
commit
930693baf6
1 changed files with 17 additions and 0 deletions
17
java/BinaryTree/BinNode.java
Normal file
17
java/BinaryTree/BinNode.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
/** ADT for binary tree nodes */
|
||||
|
||||
public interface BinNode<E> {
|
||||
/** Get and set the element value */
|
||||
public E element();
|
||||
public void setElement(E v);
|
||||
|
||||
/** @return The left child */
|
||||
public BinNode<E> left();
|
||||
|
||||
/** @return The right child */
|
||||
public BinNode<E> right();
|
||||
|
||||
/** @return True if a leaf node, false otherwise */
|
||||
public boolean isLeaf();
|
||||
}
|
Loading…
Reference in a new issue