I submitted the solution for rbtree: http://www.codechef.com/viewsolution/5649011
It shows Partially accepted but i cannot understand how can first and last sub-tasks can show wrong for just 1 task each.(I mean which test cases i have missed).
(The code is big but its just repetition of a segment with minor changes for different cases.Just 126 lines are the main essence which are repeated again.)
Please Help with the wrong test cases.
I just had a look on your code and find that it is too long … Please look at this simple implementation of my logic … I have also added comments for better understanding of the solution …
Hope this help you…
Hey @hitman_o_o look at my code : http://www.codechef.com/viewsolution/5281181 I am sure that you will understand it. If you didn’t understand, try to solve this problem : http://www.codechef.com/APRIL14/problems/BINTREE/ and look at my code once again.If you have any doubts comment below.