Any solution to solve the problem in O(logn)?

Revision en1, by SAHAL01, 2023-08-24 08:58:40

How to solve the problem below in O(log2n) C++: You have the i'th element of an unsorted array. you have to find the nearest(absolute difference of the values is as small as possible) element of the i'th element from the right side.

Tags data structure, o(log2n)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English SAHAL01 2023-08-24 08:58:40 279 Initial revision (published)