Skip to content

Commit c79b051

Browse files
authored
Merge pull request kodecocodes#535 from remlostime/binary-search-tree-swift
[Swift 4] Update Binary Search Tree
2 parents 3b79812 + 356c2fb commit c79b051

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Binary Search Tree/Solution 1/BinarySearchTree.playground/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//: Playground - noun: a place where people can play
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
let tree = BinarySearchTree<Int>(value: 7)
49
tree.insert(value: 2)
510
tree.insert(value: 5)

Binary Search Tree/Solution 1/BinarySearchTree.playground/timeline.xctimeline

Lines changed: 0 additions & 6 deletions
This file was deleted.

Binary Search Tree/Solution 2/BinarySearchTree.playground/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//: Playground - noun: a place where people can play
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
// Each time you insert something, you get back a completely new tree.
49
var tree = BinarySearchTree.leaf(7)
510
tree = tree.insert(newValue: 2)

Binary Search Tree/Solution 2/BinarySearchTree.playground/timeline.xctimeline

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)