Repository navigation
docs: fix README breadth-first search example - #94
Merged
davecom merged 1 commit intoOct 18, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the README's breadth-first search example and matching API overview to use
findAllBfs(from:goalTest:), the method currently provided byGraph. Also replaceString.characters.firstwithString.first, sincecharactersis unavailable in the documented Swift 5-and-later environment.At master
6c5fb8828d056de4c9f922662748589ede201eff, compiling the example reports thatWeightedGraph<String, Int>has no memberfindAll. After correcting the method name, compilation also reports thatcharactersis unavailable. The corrected snippet compiles and returns the expected matching route on a two-vertex fixture.Validation
swift build --jobs 1passes.git diff --checkpasses.No library behavior changes. The complete upstream test suite and performance tests were not run; local fixtures were intentionally limited to tiny graphs. macOS/Xcode, CocoaPods, Carthage, and the sample macOS app were not validated here.