You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ The project features code-level examples for the following items:
25
25
+ Generics
26
26
+ Closures
27
27
+ Hash Tables
28
+
+ Bloom Filters
28
29
+ Binary Search Trees
29
30
+ Tree Balancing (Rotations)
30
31
+ Tries
@@ -35,9 +36,9 @@ The project features code-level examples for the following items:
35
36
+ Depth-First Search
36
37
+ Breadth-First Search
37
38
38
-
Online, Print & PDF
39
+
The Book
39
40
--------------------
40
-
Available in print or pdf format, <ahref="http://shop.waynewbishop.com"target="_blank">The Swift Algorithms Book</a> features code and color illustrations that will benefit students and professionals. People are also welcome to follow the project through Github or online at <ahref="http://www.waynewbishop.com/swift"target="_blank">waynewbishop.com/swift</a>. As a collaborative open-source effort, I welcome <ahref="https://twitter.com/waynewbishop"target="_blank">feedback</a> and <ahref="http://shop.waynewbishop.com/pages/participate"target="_blank">contribution</a> from others.
41
+
Available in print or pdf format, <ahref="http://shop.waynewbishop.com"target="_blank">The Swift Algorithms Book</a> features code and color illustrations that will benefit students and professionals. As a collaborative open-source effort, I also welcome <ahref="https://twitter.com/waynewbishop"target="_blank">feedback</a> and <ahref="http://shop.waynewbishop.com/pages/participate"target="_blank">contribution</a> from others.
41
42
42
43
43
44
Example
@@ -51,17 +52,14 @@ Example
51
52
//establish a new queue
52
53
let graphQueue: Queue<Vertex> = Queue<Vertex>()
53
54
54
-
55
55
//queue a starting vertex
56
56
graphQueue.enQueue(startingv)
57
57
58
-
59
58
while!graphQueue.isEmpty() {
60
59
61
60
//traverse the next queued vertex
62
61
let vitem = graphQueue.deQueue() as Vertex!
63
62
64
-
65
63
//add unvisited vertices to the queue
66
64
for e in vitem.neighbors {
67
65
if e.neighbor.visited ==false {
@@ -70,24 +68,20 @@ Example
70
68
}
71
69
}
72
70
73
-
74
71
vitem.visited=true
75
72
print("traversed vertex: \(vitem.key!)..")
76
73
77
-
78
74
} //end while
79
75
80
-
81
76
print("graph traversal complete..")
82
77
83
-
84
78
} //end function
85
79
```
86
80
87
81
Getting Started
88
82
--------------------
89
83
90
-
Swift Structures has been optimized for Xcode 6.3 (e.g., Swift 1.2) or later. The directories are organized as follows:
84
+
Swift Structures has been optimized for Xcode 7.0 GM Seed (e.g., Swift 2.0) or later. The directories are organized as follows:
91
85
+ Source - Code for all Swift data structures and algorithms
92
86
+ Example - An empty iOS single-view application template
0 commit comments