Hello, I everyday read about algorithms and data structure but when it comes to implement it through some way i am not able to do it especially in competition.
For ex. I exactly know how Segment Tree works I have images in my mind of its working(which took a lot of time) but when it comes to solve segment tree tagged questions either offline or online I can’t do it, i try a lot but all in vain, has anyone been through this …can u help me ?
It’s Ok , happens with everyone (at least with me all the time). The only thing that can help is practice , write the segment tree for 50 times , and on 51st you will get it right the very first time .
I can write segment tree with full understanding but problem arises when i see a segment tree tagged question, I am not able to implement/modify seg-t approach to find solution… and i just feeell… so mad … i cant tell in words how i feel…
Well it’s really Ok , don’t mind it . Just keep calm and practice , you would be able to solve segment tree related problems if you keep practicing , everyone struggles in the begining , even the best ones.
try first solving the easy problems on codechef and spoj
if you are able to solve problems with maximum submission then go for problems with less submissions.try reading the solutions which appear on the first page,you get to know a lot. ultimately you will succeed