{"id":22999376,"url":"https://github.com/waynewbishop/bishop-algorithms-book","last_synced_at":"2025-04-02T13:43:49.506Z","repository":{"id":256291236,"uuid":"854827455","full_name":"waynewbishop/bishop-algorithms-book","owner":"waynewbishop","description":"A book on commonly used algorithms \u0026 data structures in Swift. ","archived":false,"fork":false,"pushed_at":"2024-10-08T19:22:22.000Z","size":1205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T04:42:58.505Z","etag":null,"topics":["algorithms","book","data-structures","graph-algorithms","ios-sdk","swift"],"latest_commit_sha":null,"homepage":"http://www.waynewbishop.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waynewbishop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T20:59:48.000Z","updated_at":"2024-10-08T19:22:25.000Z","dependencies_parsed_at":"2024-11-01T20:37:34.743Z","dependency_job_id":"7fd03cdf-56d4-4aef-b8a8-6e2bc5c2fde0","html_url":"https://github.com/waynewbishop/bishop-algorithms-book","commit_stats":null,"previous_names":["waynewbishop/swift-algorithms-book","waynewbishop/bishop-algorithms-book"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynewbishop%2Fbishop-algorithms-book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynewbishop%2Fbishop-algorithms-book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynewbishop%2Fbishop-algorithms-book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waynewbishop%2Fbishop-algorithms-book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waynewbishop","download_url":"https://codeload.github.com/waynewbishop/bishop-algorithms-book/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246826248,"owners_count":20840212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","book","data-structures","graph-algorithms","ios-sdk","swift"],"created_at":"2024-12-15T06:16:33.098Z","updated_at":"2025-04-02T13:43:49.476Z","avatar_url":"https://github.com/waynewbishop.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Algorithms \u0026 Data Structures, 5th Edition\n\nSwift, first introduced by Apple in 2014, has quickly become a cornerstone of iOS, macOS, watchOS, and tvOS development. With over a decade of evolution and refinement, Swift is now the primary language for building apps across Apple's ecosystem. It's used daily by developers worldwide to create everything from simple utility apps to complex, data-driven applications. This project provides a framework for commonly used data structures and algorithms written in Swift, offering practical implementations that go beyond the pseudocode or C/C++ examples often found on Wikipedia.\n\n## Audience\n\nAs a developer, you should already be familiar with the basics of programming. Beyond algorithms, this project also aims to provide an alternative for learning the basics of Swift. This includes implementations of many Swift-specific features such as optionals, extensions, protocols and generics. Beyond Swift, audiences should be familiar with **Singleton** and **Factory** design patterns along with sets, arrays and dictionaries.\n\n## Table of Contents\n\n1. [Introduction](book/chapters/01_introduction.md)\n2. [Big O Notation](book/chapters/02_big_o_notation.md)\n3. [Basic Sorting](book/chapters/03_basic_sorting.md)\n4. [Advanced Sorting](book/chapters/04_advanced_sorting.md)\n5. [Generics](book/chapters/05_generics.md)\n6. [Linked Lists](book/chapters/06_linked_lists.md)\n7. [Tries](book/chapters/07_tries.md)\n8. [Stacks \u0026 Queues](book/chapters/08_stacks_queues.md)\n9. [Binary Search Trees](book/chapters/09_binary_search_trees.md)\n10. Tree Balancing\n11. Graphs\n12. Shortest Paths\n13. Heaps\n14. Traversals\n15. PageRank\n16. Blockchain Design\n17. Hash Tables\n18. Closures\n19. Control Structures\n20. Recursion\n21. Dynamic Programming\n22. Unit Testing\n23. Objective-C Primer\n\n## The Book\n\nNow in its **5th edition** and supporting the latest version of Swift, the [Swift Algorithms Book](https://github.com/waynewbishop/bishop-algorithms-book) features code and color illustrations that benefits students and professionals. As a collaborative open-source effort, I also welcome feedback and contribution from others.\n\n## Example\n\n```swift\n//bfs traversal with inout closure function\nfunc traverse(_ startingv: Vertex, formula: (_ node: inout Vertex) -\u003e ()) {\n    //establish a new queue\n    let graphQueue: Queue\u003cVertex\u003e = Queue\u003cVertex\u003e()\n    \n    //queue a starting vertex\n    graphQueue.enQueue(startingv)\n    \n    while !graphQueue.isEmpty() {\n        //traverse the next queued vertex\n        guard var vitem = graphQueue.deQueue() else {\n            break\n        }\n        \n        //add unvisited vertices to the queue\n        for e in vitem.neighbors {\n            if e.neighbor.visited == false {\n                print(\"adding vertex: \\(e.neighbor.key) to queue..\")\n                graphQueue.enQueue(e.neighbor)\n            }\n        }\n        \n        //invoke formula\n        formula(\u0026vitem)\n    } //end while\n    \n    print(\"graph traversal complete..\")\n}\n```\n\n## Other Projects\n- [bishop-algorithms-swift-package](https://github.com/waynewbishop/bishop-algorithms-swift-package) - Examples of commonly used algorithms and data structures in Swift Package format.\n- [bishop-app-runbuddy-swift](https://github.com/waynewbishop/bishop-app-runbuddy-swift) - Plan your next run using Generative AI. Implemented in Swift.\n- [bishop-app-runbuddy-python](https://github.com/waynewbishop/bishop-app-runbuddy-python) - A machine learning model that recommends athletic clothing based on weather conditions.\n\n## Usage\n\nIndividuals are welcome to use the code with commercial and open-source projects. As a courtesy, please provide attribution to [waynewbishop.com](http://www.waynewbishop.com). For more information, review the complete license agreement.\n\n## Questions\n\nHave a question? Feel free to [contact me](https://www.linkedin.com/in/waynebishop/) online.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynewbishop%2Fbishop-algorithms-book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaynewbishop%2Fbishop-algorithms-book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaynewbishop%2Fbishop-algorithms-book/lists"}