Added code for Quick Sort taking first or median or end element as the pivot