Added int compare function and modified quicksort to take function pointer for comparision