Question: 1. You are given two arrays A and B, each with n keys sorted in increasing order. For simplicity, you may assume that the keys

1. You are given two arrays A and B, each with n keys sorted in increasing order. For simplicity, you may assume that the keys are all distinct from each other. (a) (10 points) Describe an O(logn) time algorithm to find the nth smallest of the 2n keys. Note that n may be even or odd and you need to consider both cases. (b) (10 points) Describe an O(logn) time algorithm to find the 4n th smallest of the 2n keys assuming that n is a multiple of 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
