implemented the algorithm that finds the kth order statistic in two sorted arrays