hi everyone...i came across a quite simple problem on spoj...

https://www.spoj.pl/problems/LITE/

obvious solution will be O(n)...but it is getting TLE...
so we have to improve the complexity to O(logn)......can some suggest the
segment tree implementation of this problem

i am new to segment tree....so please explain how can we make use of segment
tree to solve this particular problem in O(logn) !!
--


Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to