Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victorpanitz/iOS-SortingAlgorithmsApp
An app focused on show in a visual way how sorting algorithms actually works.
https://github.com/victorpanitz/iOS-SortingAlgorithmsApp
Last synced: 2 months ago
JSON representation
An app focused on show in a visual way how sorting algorithms actually works.
- Host: GitHub
- URL: https://github.com/victorpanitz/iOS-SortingAlgorithmsApp
- Owner: victorpanitz
- Created: 2019-04-04T12:56:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-24T17:29:01.000Z (about 2 years ago)
- Last Synced: 2024-08-03T17:19:43.106Z (6 months ago)
- Language: Swift
- Size: 986 KB
- Stars: 48
- Watchers: 2
- Forks: 17
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-open-source-ios-apps - SortingAlgorithmsApp
README
![Alt text](https://i.imgur.com/SaWlE8K.png)
# Sorting Algorithms App
An open source app focused on show in a visual way how sorting algorithms actually works.**Available on the app store**
![Alt text](https://i.imgur.com/CL9hL95.png)
### Do you want to contribute? Check the backlog
#### // TODO:
- [ ] New algorithms;
- [ ] Control animation speed;
- [ ] Add algorithm details about the selected algorithm;
- [ ] Improve code coverage (unit tests);
- [ ] More features to the backlog :)### Adding a new algorithm
Create 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.
```Swift
final class InsertionSort: Algorithm {
final var title: String = "Insertion Sort"
final var image: String = "ic_insertion"
final var description: String = "Insertion Sort Description"
final func generateSwaps(from list: [Int]) -> [(x0: Int, x1: Int)] {
if list.count == 1 { return [] }
var array = list
var swaps = [(x0: Int, x1: Int)]()
// APPEND ALL GENERATED SWAPS TO IT'S ARRAY
return swaps
}
}
```### Update the data source with your new algorithm
```Swift
class AlgorithmsListPresenter {
private weak var view: AlgorithmsListView?
private let router: AlgorithmsListRoutering
private let dataSource: [Algorithm] = [
BubbleSort(),
InsertionSort(),
SelectionSort()
]
...
}
```### Submiting contributions
Try 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.
### Contributors
The list of [contributors](https://github.com/victorpanitz/iOS-SortingAlgorithmsApp/graphs/contributors):🇧🇷 - [Victor Panitz Magalhães](https://github.com/victorpanitz)
🇮🇳 - [Anantha Krishnan](https://github.com/AnanthaKrish)
🇧🇷 - [João Reichert](https://github.com/reeichert)
🇨🇳 - [urmyfaith](https://github.com/urmyfaith?tab=repositories)