Last active
March 22, 2018 17:37
-
-
Save Abhishek9634/99241050f0c0550e5aa13ce69a40dc00 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
import Foundation | |
class TreeNode<T> { | |
var data: T | |
var leftNode: TreeNode? | |
var rightNode: TreeNode? | |
init(data: T, | |
leftNode: TreeNode? = nil, | |
rightNode: TreeNode? = nil) { | |
self.data = data | |
self.leftNode = leftNode | |
self.rightNode = rightNode | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment