Skip to content

Commit 1ace7e8

Browse files
authored
Merge pull request kodecocodes#1 from raywenderlich/master
Update folk
2 parents 9f96077 + 8e955cd commit 1ace7e8

File tree

568 files changed

+185135
-8245
lines changed

Some content is hidden

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

568 files changed

+185135
-8245
lines changed

.swiftlint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cyclomatic_complexity: 12
2+
file_length: 550
3+
function_body_length: 80
4+
function_parameter_count: 8
5+
line_length: 150
6+
type_body_length: 300
7+
variable_name:
8+
min_length:
9+
error: 1
10+
warning: 1
11+
excluded:
12+
- N
13+
14+
disabled_rules:
15+
- valid_docs
16+
17+
custom_rules:
18+
smiley_face:
19+
name: "Smiley Face"
20+
regex: "(\:\))"
21+
match_kinds:
22+
- comment
23+
- string
24+
message: "A closing parenthesis smiley :) creates a half-hearted smile, and thus is not preferred. Use :]"
25+
severity: warning

.travis.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,47 @@
11
language: objective-c
2-
osx_image: xcode7.3
2+
osx_image: xcode8
3+
# sudo: false
4+
5+
install:
6+
7+
# - ./install_swiftlint.sh
38

49
script:
510

611
- xcodebuild test -project ./All-Pairs\ Shortest\ Paths/APSP/APSP.xcodeproj -scheme APSPTests
712
- xcodebuild test -project ./Array2D/Tests/Tests.xcodeproj -scheme Tests
813
- xcodebuild test -project ./AVL\ Tree/Tests/Tests.xcodeproj -scheme Tests
914
- xcodebuild test -project ./Binary\ Search/Tests/Tests.xcodeproj -scheme Tests
15+
- xcodebuild test -project ./Boyer-Moore/Tests/Tests.xcodeproj -scheme Tests
1016
- xcodebuild test -project ./Binary\ Search\ Tree/Solution\ 1/Tests/Tests.xcodeproj -scheme Tests
1117
- xcodebuild test -project ./Bloom\ Filter/Tests/Tests.xcodeproj -scheme Tests
18+
- xcodebuild test -project ./Bounded\ Priority\ Queue/Tests/Tests.xcodeproj -scheme Tests
1219
- xcodebuild test -project ./Breadth-First\ Search/Tests/Tests.xcodeproj -scheme Tests
1320
- xcodebuild test -project ./Bucket\ Sort/Tests/Tests.xcodeproj -scheme Tests
21+
- xcodebuild test -project ./B-Tree/Tests/Tests.xcodeproj -scheme Tests
22+
- xcodebuild test -project ./Comb\ Sort/Tests/Tests.xcodeproj -scheme Tests
23+
- xcodebuild test -project ./Counting\ Sort/Tests/Tests.xcodeproj -scheme Tests
24+
- xcodebuild test -project ./Depth-First\ Search/Tests/Tests.xcodeproj -scheme Tests
25+
- xcodebuild test -project ./Graph/Graph.xcodeproj -scheme GraphTests
1426
- xcodebuild test -project ./Heap/Tests/Tests.xcodeproj -scheme Tests
1527
- xcodebuild test -project ./Heap\ Sort/Tests/Tests.xcodeproj -scheme Tests
1628
- xcodebuild test -project ./Insertion\ Sort/Tests/Tests.xcodeproj -scheme Tests
1729
- xcodebuild test -project ./K-Means/Tests/Tests.xcodeproj -scheme Tests
1830
- xcodebuild test -project ./Linked\ List/Tests/Tests.xcodeproj -scheme Tests
1931
- xcodebuild test -project ./Longest\ Common\ Subsequence/Tests/Tests.xcodeproj -scheme Tests
32+
- xcodebuild test -project ./Minimum\ Spanning\ Tree\ \(Unweighted\)/Tests/Tests.xcodeproj -scheme Tests
2033
- xcodebuild test -project ./Priority\ Queue/Tests/Tests.xcodeproj -scheme Tests
2134
- xcodebuild test -project ./Queue/Tests/Tests.xcodeproj -scheme Tests
2235
- xcodebuild test -project ./Quicksort/Tests/Tests.xcodeproj -scheme Tests
23-
- xcodebuild test -project ./Run-Length\ Encoding/Tests/Tests.xcodeproj -scheme Tests
36+
- xcodebuild test -project ./Radix\ Sort/Tests/Tests.xcodeproj -scheme Tests
37+
- xcodebuild test -project ./Rootish\ Array\ Stack/Tests/Tests.xcodeproj -scheme Tests
2438
- xcodebuild test -project ./Select\ Minimum\ Maximum/Tests/Tests.xcodeproj -scheme Tests
2539
- xcodebuild test -project ./Selection\ Sort/Tests/Tests.xcodeproj -scheme Tests
2640
- xcodebuild test -project ./Shell\ Sort/Tests/Tests.xcodeproj -scheme Tests
41+
- xcodebuild test -project ./Shortest\ Path\ \(Unweighted\)/Tests/Tests.xcodeproj -scheme Tests
2742
- xcodebuild test -project ./Single-Source\ Shortest\ Paths\ \(Weighted\)/SSSP.xcodeproj -scheme SSSPTests
28-
- xcodebuild test -project ./Stack/Tests/Tests.xcodeproj -scheme Tests
43+
- xcodebuild test -project ./Stack/Tests/Tests.xcodeproj -scheme Tests
44+
- xcodebuild test -project ./Topological\ Sort/Tests/Tests.xcodeproj -scheme Tests
45+
- xcodebuild test -project ./Treap/Treap/Treap.xcodeproj -scheme Tests
46+
- xcodebuild test -project ./Palindromes/Test/Test.xcodeproj -scheme Test
47+
- xcodebuild test -project ./Ternary\ Search\ Tree/Tests/Tests.xcodeproj -scheme Tests

AVL Tree/AVLTree.playground/Contents.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
let tree = AVLTree<Int, String>()
44

5-
tree.insert(5, "five")
5+
tree.insert(key: 5, payload: "five")
66
print(tree)
77

8-
tree.insert(4, "four")
8+
tree.insert(key: 4, payload: "four")
99
print(tree)
1010

11-
tree.insert(3, "three")
11+
tree.insert(key: 3, payload: "three")
1212
print(tree)
1313

14-
tree.insert(2, "two")
14+
tree.insert(key: 2, payload: "two")
1515
print(tree)
1616

17-
tree.insert(1, "one")
17+
tree.insert(key: 1, payload: "one")
1818
print(tree)
1919
print(tree.debugDescription)
2020

21-
let node = tree.search(2) // "two"
21+
let node = tree.search(input: 2) // "two"
2222

23-
tree.delete(5)
24-
tree.delete(2)
25-
tree.delete(1)
26-
tree.delete(4)
27-
tree.delete(3)
23+
tree.delete(key: 5)
24+
tree.delete(key: 2)
25+
tree.delete(key: 1)
26+
tree.delete(key: 4)
27+
tree.delete(key: 3)

0 commit comments

Comments
 (0)