Skip to content

HongyuS/MaxHeap-and-Heapsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Max Heap-sort Visulized Using SwiftUI

Input: A sequence of unsorted numbers, such as: 16, 7, 22, 19, and 12.

Graphical Interface Instructions:

  • Type in a sequence of integers in the Text Field. The inputs should be separated by space. Invalid inputs will be omitted.

  • The upper Gray Area shows the real-time status of the max heap, represented in array.

  • The lower Gray Area shows the sorted array dynamicly in real-time.

Perss "Next Step" button to sort the array step by step. If the input array is empty, or is fully sorted, the "Next Step" button will be disabled. You can input another array of integers when the previous array is fully sorted.