Sorting Algorithm

Implemented algorithms are based on the pseudocodes in our lecture note.
red: fixed elements
blue: compared elements
yellow: minimum elements
red: fixed elements
blue: compared elements
yellow: minimum elements in each group
black/gray represents groups
red: fixed elements
blue: compared elements
red: fixed elements
blue: compared elements
yellow: the element exchanged lately
orange: sorted elements
blue: compared elements
yellow: inserted elements
orange: sorted elements in each group
blue: compared elements
yellow: inserted elements
orange: merged elements
blue: elements compared from right
green: elements compared from left
red: fixed elements
yellow: pivot elements
blue: elements compared from right
green: elements compared from left
red: fixed elements
yellow: root elements/compared elements
blue: compared elements