This file contains hidden or 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
//TODO add recursive | |
import java.util.*; | |
//Node class | |
class Node{ | |
int data; | |
Node left; | |
Node right; | |
Node(int data){ |
This file contains hidden or 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
//TODO add with morristraversal | |
import java.util.*; | |
//Node class | |
class Node{ | |
int data; | |
Node left; | |
Node right; | |
Node(int data){ | |
this.data = data; |
This file contains hidden or 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
//TODO add iterative with single stack | |
import java.util.*; | |
//Node class | |
class Node{ | |
int data; | |
Node left; | |
Node right; | |
Node(int data){ | |
this.data = data; | |
this.left=null; |
This file contains hidden or 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
//TODO add morrisTraversal | |
import java.util.*; | |
//Node class | |
class Node{ | |
int data; | |
Node left; | |
Node right; | |
Node(int data){ | |
this.data = data; | |
this.left=null; |