quick selection sort and BSTtoLinkedList