Skip to content

Commit 0c4aca6

Browse files
authored
Merge pull request #537 from remlostime/dfs-swift
[Swift 4] Update DFS
2 parents 88cfc01 + 0b7d673 commit 0c4aca6

File tree

1 file changed

+5
-0
lines changed
  • Depth-First Search/DepthFirstSearch.playground/Pages/Simple Example.xcplaygroundpage

1 file changed

+5
-0
lines changed

Depth-First Search/DepthFirstSearch.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 depthFirstSearch(_ graph: Graph, source: Node) -> [String] {
27
var nodesExplored = [source.label]
38
source.visited = true

0 commit comments

Comments
 (0)