Question: Can you help me design an algorithm with O(logn) runtime. Introduction : we have arrays Q[1:n] and W[1:n], which are made up of distinct numbers.

Can you help me design an algorithm with O(logn) runtime.

Introduction: we have arrays Q[1:n] and W[1:n], which are made up of distinct numbers. (For example: Q[1] < W[1] and Q[8] > W[8] I need to find an index y that belongs [1:n] and satisfied with two conditions --- Q[y] < W[y] and Q[y+1] > W[y+1].

Recommend: you do not need give me real code. Procedure code and clear explanation thats all I need.

I will give upvote for timely and correct answer. Thank you!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!