find the value?can someone help me reduce complexity.

Правка en1, от _aditya, 2019-02-07 08:24:59

There is a list of key vs value pair.size = n. No I have been given a key I have to find the max value from the list such that its key is less than the given key.

If there are q queries I can do this in O(qn). Is there a faster way to do this.

Теги #sorting

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский _aditya 2019-02-07 08:24:59 303 Initial revision (published)