kth method

a class to find kth smalles element pass the array by refrance and k and
the array will have kth greatest elemnts on right and lowest elements on
left