add partialsection and quickselection for kth smallest element