|
|
вернуться в форумI have the O(n) algorithm,do you want to know? Re: I have the O(n) algorithm,do you want to know? YES, you are like salesman now. Re: I have the O(n) algorithm,do you want to know? I think we can find answer_depth of roots for O(N) - let's consider d - diameter of tree, if d mod 2 = 0 then ans_depth = d div 2 else ans_depth = d div 2 + 1 Edited by author 30.08.2008 15:39 Edited by author 30.08.2008 15:40 Re: I have the O(n) algorithm,do you want to know? Everyone knows it's O(n) |
|
|