Last active
August 29, 2015 13:57
-
-
Save adderllyer/9362590 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
package com.ds.tree.adt; | |
public interface TreeTraversal { | |
/** | |
* visit binary tree pre-order | |
* @param root binary tree root node | |
*/ | |
public String preOrder(); | |
/** | |
* visit binary tree post-order | |
* @param root binary tree root node | |
* @return String nodes' value list | |
*/ | |
public String postOrder(); | |
/** | |
* visit binary tree in-order | |
* @param root binary tree root node | |
* @return String nodes' value list | |
*/ | |
public String inOrder(); | |
/** | |
* visit binary tree per level | |
* @param root binary tree root node | |
* @return String nodes' value list | |
*/ | |
public String levelOrder(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment