Блог пользователя luczki602

Автор luczki602, история, 13 месяцев назад, По-английски

Hello,

Quick question! I can't really find any structure in O(log n) with those operations on increasing sequence of integer numbers: i. adding new element / shifting range of subsequence ii. adding value to all elements of subsequence iii. binsearch first element >= value

I thought that maybe AVL tree would be sensible, but didn't code any and I couldn't find any blog with AVL tree structure with adding value to range.

Thanks for any response in advance!

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

»
13 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It's called Treap. I think here is a good lecture: https://www.youtube.com/watch?v=svAHk-FAQgM