Selection Sort Algorithm Animation: Implementation
- We add a draw method to the algorithm class
- draw draws the current state of the data structure, highlighting items of special interest
- draw is specific to the particular algorithm
- In this case, draws the array elements as a sequence of sticks in different colors
- The already sorted portion is blue
- The marked position is red
- The remainder is black