Skip to content

Commit 92363b8

Browse files
committed
fix spaces
1 parent 3fc54e6 commit 92363b8

File tree

2 files changed

+397
-397
lines changed

2 files changed

+397
-397
lines changed

Threaded Binary Tree/ThreadedBinaryTree.playground/Contents.swift

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33

44
// Simple little debug function to make testing output pretty
55
func check(_ tree: ThreadedBinaryTree<Int>?) {
6-
if let tree = tree {
7-
print("\(tree.count) Total Nodes:")
8-
print(tree)
9-
print("Debug Info:")
10-
print(tree.debugDescription)
11-
print("In-Order Traversal:")
12-
let myArray = tree.toArray()
13-
for node in myArray {
14-
print(node)
15-
}
16-
if tree.isBST(minValue: Int.min, maxValue: Int.max) {
17-
print("This is a VALID binary search tree.")
18-
} else {
19-
print("This is an INVALID binary search tree.")
20-
}
21-
if tree.isThreaded() {
22-
print("This is a VALID threaded binary tree.")
23-
} else {
24-
print("This is an INVALID threaded binary tree.")
25-
}
6+
if let tree = tree {
7+
print("\(tree.count) Total Nodes:")
8+
print(tree)
9+
print("Debug Info:")
10+
print(tree.debugDescription)
11+
print("In-Order Traversal:")
12+
let myArray = tree.toArray()
13+
for node in myArray {
14+
print(node)
15+
}
16+
if tree.isBST(minValue: Int.min, maxValue: Int.max) {
17+
print("This is a VALID binary search tree.")
18+
} else {
19+
print("This is an INVALID binary search tree.")
20+
}
21+
if tree.isThreaded() {
22+
print("This is a VALID threaded binary tree.")
23+
} else {
24+
print("This is an INVALID threaded binary tree.")
25+
}
2626
} else {
27-
print("This tree is nil.")
27+
print("This tree is nil.")
2828
}
2929
}
3030

0 commit comments

Comments
 (0)