Skip to content

Instantly share code, notes, and snippets.

@kedarmhaswade
Created March 26, 2015 00:41
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 kedarmhaswade/941527db4e6a2094525a to your computer and use it in GitHub Desktop.
Save kedarmhaswade/941527db4e6a2094525a to your computer and use it in GitHub Desktop.
Inorder tree walk ...
class Tree {
Tree left, right;
int key;
static void inorder(Tree r) {
if (r != null) {
inorder(r.left);
System.out.println(r.key);
inorder(r.right);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment