/visualsort

Animations that illustrate how effectively data sets from different starting points can be sorted using different algorithms.

Primary LanguageSwift

Sorting animation App

Swift Platform

Target

The aim of the project is to graphically represent the effectiveness that data sets from different starting points can be sort using different algorithms.

Requirements

Xcode 13.2.1
Swift 5
iOS 13.0

Implemented Algorithms

These are the implemented algorithms with few explainations

Bubble Sort

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.

Selection sort

The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.

  1. The subarray which is already sorted.
  2. Remaining subarray which is unsorted. In every iteration of selection sort, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the sorted subarray.

Insertion sort

Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the correct position in the sorted part.

Sample

This is a sample of the app.

Sort: Visual sort app