Skip to content

Commit d2bb0d8

Browse files
authored
Merge branch 'master' into HashSet-Swift4
2 parents e7b8f97 + fdd9e04 commit d2bb0d8

File tree

44 files changed

+290
-192
lines changed

Some content is hidden

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

44 files changed

+290
-192
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode8.3
2+
osx_image: xcode9
33
# sudo: false
44

55
install:

Array2D/Array2D.playground/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// last checked with Xcode 9.0b4
2+
#if swift(>=4.0)
3+
print("Hello, Swift 4!")
4+
#endif
5+
16
/*
27
Two-dimensional array with a fixed number of rows and columns.
38
This is mostly handy for games that are played on a grid, such as chess.

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.

Binary Search/BinarySearch.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
// An unsorted array of numbers
49
let numbers = [11, 59, 3, 2, 53, 17, 31, 7, 19, 67, 47, 13, 37, 61, 29, 43, 5, 41, 23]
510

Binary Search/BinarySearch.playground/timeline.xctimeline

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

Binary Tree/BinaryTree.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
public indirect enum BinaryTree<T> {
49
case node(BinaryTree<T>, T, BinaryTree<T>)
510
case empty

Breadth-First Search/BreadthFirstSearch.playground/Pages/Simple example.xcplaygroundpage/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// last checked with Xcode 9.0b4
2+
#if swift(>=4.0)
3+
print("Hello, Swift 4!")
4+
#endif
5+
16
func breadthFirstSearch(_ graph: Graph, source: Node) -> [String] {
27
var queue = Queue<Node>()
38
queue.enqueue(source)

0 commit comments

Comments
 (0)