Skip to content

Commit 5c2a3ff

Browse files
committed
Add files via upload
1 parent ecb2cd9 commit 5c2a3ff

File tree

696 files changed

+39674
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

696 files changed

+39674
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//: Playground - noun: a place where people can play
2+
3+
let tree = AVLTree<Int, String>()
4+
5+
tree.insert(5, "five")
6+
print(tree)
7+
8+
tree.insert(4, "four")
9+
print(tree)
10+
11+
tree.insert(3, "three")
12+
print(tree)
13+
14+
tree.insert(2, "two")
15+
print(tree)
16+
17+
tree.insert(1, "one")
18+
print(tree)
19+
print(tree.debugDescription)
20+
21+
let node = tree.search(2) // "two"
22+
23+
tree.delete(5)
24+
tree.delete(2)
25+
tree.delete(1)
26+
tree.delete(4)
27+
tree.delete(3)

0 commit comments

Comments
 (0)