fix tests of quick_sort
add tests and implementation of randomized_selection