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

Автор Kriti, 9 лет назад, По-английски

As such i know Segment Tree implementation of variants and have implemented it half dozen times ,still Segment Tree has become a problem which i am getting WA continously in general . How do you give a shot to debugging segment tree solution in general ?

Also every blog i read about Segment Tree ,they pictured Segment Tree of 2^n elements which is simple but i really dont know how to picture up Segment Tree formed out k nodes where k!=2^n :/ Can leafs of such a tree be at different heights ? I mean when i print out my ST linearly is it necessary for leaves to be in same order as the original array from which i constructed segment tree?

Thnksy in adv ^_^

Полный текст и комментарии »

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