JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
SPOJ Problem 61 BRCKTS | Reply
I tried to solve http://www.spoj.com/problems/BRCKTS/ problem using Segment tree but i am getting tle can anyone help me
Here is my solution
http://ideone.com/KoS1ZU
Thanks in Advance
Re: SPOJ Problem 61 BRCKTS (response to post by tyson7636) | Reply
Finally i managed to just ACed it and the reason for tle was dynamic memory allocation each time the merge function was called if the address of node returned by merge could be replaced by the address of a static node and then copy the contents onto the segment tree node then it would take less time :)
RSS