implement some basic sorting methods like bubble sort and insertion sort; use methods similiar to quick sort to find the nth data in an array