Finished basic sorting algorithms implementation