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
Get step-by-step solutions from verified subject matter experts
