You are given two arrays: Arr1 and Arr2. Arr1 will be given sorted. For each element v in Arr2, you need to write a pseudo code that will print the number of elements in Arr1 that is less than or...


You are given two arrays: Arr1 and Arr2.
Arr1 will be given sorted.


For each element v in Arr2, you need to write a pseudo code that will print the number of elements in Arr1 that is less than or equal to v.


For example: if I give you two arrays of size 5 and 4,
Arr1 =  1 3 5 7 9
Arr2 = 6 4 8
The output should be: 3 2 4



Your searching method should not take more than O(log n) time.



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here