Implements Heap sort
Creates helper class and implements  swap method