How to solve Hotels problem on Spoj with binary search

Правка en1, от samurai123, 2016-12-23 08:39:25

I have solved the problem [LINK] with sliding window. But in comments, some people mentioned about solving it with binary search. What should be the search function for binary search in the problem? Can that function be made without using concept of sliding window.(http://www.spoj.com/problems/HOTELS/)

Теги spoj, binary seach, sliding window, two pointers

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский samurai123 2016-12-23 08:40:08 76
en1 Английский samurai123 2016-12-23 08:39:25 358 Initial revision (published)