added qsort using dynamic array. todo: implement mergesort and heapsort