{"id":13694350,"url":"https://github.com/victorpanitz/iOS-SortingAlgorithmsApp","last_synced_at":"2025-05-03T01:32:49.096Z","repository":{"id":150037720,"uuid":"179497438","full_name":"victorpanitz/iOS-SortingAlgorithmsApp","owner":"victorpanitz","description":"An app focused on show in a visual way how sorting algorithms actually works.","archived":false,"fork":false,"pushed_at":"2022-11-24T17:29:01.000Z","size":1010,"stargazers_count":48,"open_issues_count":3,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T17:19:43.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victorpanitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-04-04T12:56:09.000Z","updated_at":"2024-03-31T05:34:43.000Z","dependencies_parsed_at":"2023-04-05T06:00:14.821Z","dependency_job_id":null,"html_url":"https://github.com/victorpanitz/iOS-SortingAlgorithmsApp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorpanitz%2FiOS-SortingAlgorithmsApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorpanitz%2FiOS-SortingAlgorithmsApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorpanitz%2FiOS-SortingAlgorithmsApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorpanitz%2FiOS-SortingAlgorithmsApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorpanitz","download_url":"https://codeload.github.com/victorpanitz/iOS-SortingAlgorithmsApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224346558,"owners_count":17296239,"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":[],"created_at":"2024-08-02T17:01:29.992Z","updated_at":"2024-11-12T20:32:09.861Z","avatar_url":"https://github.com/victorpanitz.png","language":"Swift","readme":"![Alt text](https://i.imgur.com/SaWlE8K.png)\n\n# Sorting Algorithms App\nAn open source app focused on show in a visual way how sorting algorithms actually works.\n\n**Available on the app store**\n\n![Alt text](https://i.imgur.com/CL9hL95.png)\n\n### Do you want to contribute? Check the backlog\n\n#### // TODO:\n- [ ] New algorithms;\n- [ ] Control animation speed;\n- [ ] Add algorithm details about the selected algorithm;\n- [ ] Improve code coverage (unit tests);\n- [ ] More features to the backlog :)\n\n### Adding a new algorithm\n\nCreate a class implemeting the protocol ```Algorithm```. Following the example for the class ```InsertionSort```, you'd need to set the title of your algorithm, the image (pick a nice logo representing your algorithm:)) and description. In the method ```GenerateSwaps```, add the necessary logic to generate all cell swaps which would be necessary.\n\n```Swift \nfinal class InsertionSort: Algorithm {\n    \n    final var title: String = \"Insertion Sort\"\n    final var image: String = \"ic_insertion\"\n    final var description: String = \"Insertion Sort Description\"\n    \n    final func generateSwaps(from list: [Int]) -\u003e [(x0: Int, x1: Int)] {\n        if list.count == 1 { return [] }\n        \n        var array = list\n        var swaps = [(x0: Int, x1: Int)]()\n        \n        // APPEND ALL GENERATED SWAPS TO IT'S ARRAY\n        \n        return swaps\n    }\n}\n```\n\n### Update the data source with your new algorithm\n\n```Swift\nclass AlgorithmsListPresenter {\n    \n    private weak var view: AlgorithmsListView?\n    private let router: AlgorithmsListRoutering\n    \n    private let dataSource: [Algorithm] = [\n        BubbleSort(),\n        InsertionSort(),\n        SelectionSort()\n    ]\n ...\n}   \n```\n\n### Submiting contributions\n\nTry adding your own solution, feel free to suggest changes on the current code. If you're ready to submit a contribution, create a pull request describing your approach. All contributions are welcome even the small ones.\n\n### Contributors\nThe list of [contributors](https://github.com/victorpanitz/iOS-SortingAlgorithmsApp/graphs/contributors):\n\n🇧🇷 - [Victor Panitz Magalhães](https://github.com/victorpanitz)\n\n🇮🇳 - [Anantha Krishnan](https://github.com/AnanthaKrish)\n\n🇧🇷 - [João Reichert](https://github.com/reeichert)\n\n🇨🇳 - [urmyfaith](https://github.com/urmyfaith?tab=repositories)\n\n\n","funding_links":[],"categories":["Misc"],"sub_categories":["Notes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorpanitz%2FiOS-SortingAlgorithmsApp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorpanitz%2FiOS-SortingAlgorithmsApp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorpanitz%2FiOS-SortingAlgorithmsApp/lists"}