Swift implementation of Dave Thomas's Transitive Dependencies programming exercise
Swift
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
TransitiveDepsKata.xcodeproj
TransitiveDepsKata
.gitignore Initial commit Jun 6, 2016
LICENSE
README.md

README.md

Transitive Dependencies Kata

A concise Swift 2.2 implementation of Dave Thomas's Transitive Dependencies programming exercise, also known as a kata.

My approach to solving this problem involves visiting nodes in a dependency graph by iterating through a node's direct dependencies, recursing into indirect dependencies if possible. A Set collection is used to accumulate dependencies when applying reduce to a node's direct dependencies. That Set is also used to check if a node has already been visited, to avoid navigating cyclical dependencies.

Check out the details in main.swift.