Skip to content

Commit de53ddd

Browse files
authored
Merge branch 'master' into graph-swift
2 parents fec5364 + aac01a1 commit de53ddd

File tree

105 files changed

+1712
-826
lines changed

Some content is hidden

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

105 files changed

+1712
-826
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:

AVL Tree/AVLTree.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 = AVLTree<Int, String>()
49

510
tree.insert(key: 5, payload: "five")

AVL Tree/Tests/AVLTreeTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
//
88

99
import XCTest
10-
1110
class AVLTreeTests: XCTestCase {
12-
1311
var tree: AVLTree<Int, String>?
1412

13+
func testSwift4() {
14+
// last checked with Xcode 9.0b4
15+
#if swift(>=4.0)
16+
print("Hello, Swift 4!")
17+
#endif
18+
}
1519
override func setUp() {
1620
super.setUp()
1721

AVL Tree/Tests/Tests.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
ONLY_ACTIVE_ARCH = YES;
181181
SDKROOT = macosx;
182182
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
183+
SWIFT_VERSION = 4.0;
183184
};
184185
name = Debug;
185186
};
@@ -219,6 +220,7 @@
219220
MTL_ENABLE_DEBUG_INFO = NO;
220221
SDKROOT = macosx;
221222
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
223+
SWIFT_VERSION = 4.0;
222224
};
223225
name = Release;
224226
};
@@ -230,7 +232,7 @@
230232
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
231233
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
232234
PRODUCT_NAME = "$(TARGET_NAME)";
233-
SWIFT_VERSION = 3.0;
235+
SWIFT_VERSION = 4.0;
234236
};
235237
name = Debug;
236238
};
@@ -242,7 +244,7 @@
242244
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
243245
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
244246
PRODUCT_NAME = "$(TARGET_NAME)";
245-
SWIFT_VERSION = 3.0;
247+
SWIFT_VERSION = 4.0;
246248
};
247249
name = Release;
248250
};

AVL Tree/Tests/TreeNodeTests.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99
import XCTest
1010

1111
class TreeNodeTests: XCTestCase {
12-
12+
1313
var root: TreeNode<String, String>?
1414
var left: TreeNode<String, String>?
1515
var right: TreeNode<String, String>?
16-
16+
func testSwift4() {
17+
// last checked with Xcode 9.0b4
18+
#if swift(>=4.0)
19+
print("Hello, Swift 4!")
20+
#endif
21+
}
1722
override func setUp() {
1823
super.setUp()
1924

All-Pairs Shortest Paths/APSP/APSP.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
import Graph
49
import APSP
510

All-Pairs Shortest Paths/APSP/APSP.playground/timeline.xctimeline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
version = "3.0">
44
<TimelineItems>
55
<LoggerValueHistoryTimelineItem
6-
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=888&amp;EndingColumnNumber=44&amp;EndingLineNumber=29&amp;StartingColumnNumber=3&amp;StartingLineNumber=28&amp;Timestamp=486844329.035763"
6+
documentLocation = "file:///Users/kachen/src/swift-algorithm-club/All-Pairs%20Shortest%20Paths/APSP/APSP.playground#CharacterRangeLen=0&amp;CharacterRangeLoc=971&amp;EndingColumnNumber=68&amp;EndingLineNumber=34&amp;StartingColumnNumber=68&amp;StartingLineNumber=34&amp;Timestamp=523221730.015692"
77
selectedRepresentationIndex = "0"
88
shouldTrackSuperviewWidth = "NO">
99
</LoggerValueHistoryTimelineItem>
1010
<LoggerValueHistoryTimelineItem
11-
documentLocation = "#CharacterRangeLen=4&amp;CharacterRangeLoc=825&amp;EndingColumnNumber=9&amp;EndingLineNumber=29&amp;StartingColumnNumber=5&amp;StartingLineNumber=29&amp;Timestamp=486844329.036018"
11+
documentLocation = "file:///Users/kachen/src/swift-algorithm-club/All-Pairs%20Shortest%20Paths/APSP/APSP.playground#CharacterRangeLen=4&amp;CharacterRangeLoc=908&amp;EndingColumnNumber=9&amp;EndingLineNumber=34&amp;StartingColumnNumber=5&amp;StartingLineNumber=34&amp;Timestamp=523221730.015887"
1212
selectedRepresentationIndex = "0"
1313
shouldTrackSuperviewWidth = "NO">
1414
</LoggerValueHistoryTimelineItem>

All-Pairs Shortest Paths/APSP/APSP.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
389389
PRODUCT_BUNDLE_IDENTIFIER = "com.swift-algorithm-club.APSPTests";
390390
PRODUCT_NAME = "$(TARGET_NAME)";
391-
SWIFT_VERSION = 3.0;
391+
SWIFT_VERSION = 4.0;
392392
};
393393
name = Debug;
394394
};
@@ -400,7 +400,7 @@
400400
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
401401
PRODUCT_BUNDLE_IDENTIFIER = "com.swift-algorithm-club.APSPTests";
402402
PRODUCT_NAME = "$(TARGET_NAME)";
403-
SWIFT_VERSION = 3.0;
403+
SWIFT_VERSION = 4.0;
404404
};
405405
name = Release;
406406
};

All-Pairs Shortest Paths/APSP/APSPTests/APSPTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ struct TestCase<T> where T: Hashable {
2020

2121
class APSPTests: XCTestCase {
2222

23+
func testSwift4() {
24+
// last checked with Xcode 9.0b4
25+
#if swift(>=4.0)
26+
print("Hello, Swift 4!")
27+
#endif
28+
}
29+
2330
/**
2431
See Figure 25.1 of “Introduction to Algorithms” by Cormen et al, 3rd ed., pg 690
2532
*/

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.

0 commit comments

Comments
 (0)