- Notifications
You must be signed in to change notification settings - Fork17
victorpanitz/iOS-SortingAlgorithmsApp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
An open source app focused on show in a visual way how sorting algorithms actually works.
Available on the app store
- New algorithms;
- Control animation speed;
- Add algorithm details about the selected algorithm;
- Improve code coverage (unit tests);
- More features to the backlog :)
Create a class implemeting the protocolAlgorithm
. Following the example for the classInsertionSort
, you'd need to set the title of your algorithm, the image (pick a nice logo representing your algorithm:)) and description. In the methodGenerateSwaps
, add the necessary logic to generate all cell swaps which would be necessary.
finalclassInsertionSort:Algorithm{finalvartitle:String="Insertion Sort"finalvarimage:String="ic_insertion"finalvardescription:String="Insertion Sort Description"finalfunc generateSwaps(from list:[Int])->[(x0:Int, x1:Int)]{if list.count==1{return[]}vararray= listvarswaps=[(x0: Int, x1: Int)]() // APPEND ALL GENERATED SWAPS TO IT'S ARRAYreturn swaps}}
classAlgorithmsListPresenter{private weakvarview:AlgorithmsListView?privateletrouter:AlgorithmsListRouteringprivateletdataSource:[Algorithm]=[BubbleSort(),InsertionSort(),SelectionSort()]...}
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.
The list ofcontributors:
🇮🇳 -Anantha Krishnan
🇧🇷 -João Reichert
🇨🇳 -urmyfaith
About
An app focused on show in a visual way how sorting algorithms actually works.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.