import Foundation
class BinaryTreeNode {
let value: Int
var left: BinaryTreeNode?
var right: BinaryTreeNode?
init(_ value: Int) {
self.value = value
}
}
struct BinaryTree {
var root: BinaryTreeNode?
func inOrderDisplay(_ node: BinaryTreeNode?) {
guard let node = node else { return }
inOrderDisplay(node.left)
print("\(node.value) ")
inOrderDisplay(node.right)
}
}