changed sorting parameters

Made all sorting methods take its data ArrayList as an argument as
opposed to making it for itself.  this is to ensure consistency as it is
required for quicksort