|
|
вернуться в форумWhy trees are so slow? TLE11 I use binary trees + lists for sorting, but I got TLE on 11th test. Why TLE? Tree sorting isn't slowly sort algorithm?! Re: Why trees are so slow? TLE11 Послано Lomir 4 янв 2008 06:30 Do you use balanced trees? Just binnary trees will cetranly TLE. However you could make random permutation before creating a tree itself, this will prevent the worst case of O(n) height. And keep your tree relatively balanced. |
|
|