View Single Post
Old Jan 2nd, 2008, 6:00 PM   #23
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 884
Rep Power: 4 The Dark is on a distinguished road
Re: Challenging Programming Problem - "Pinball Ranking"

Quote:
Originally Posted by titaniumdecoy View Post
Binary trees have a worst-case insert time of O(n), so your solution most likely does not satisfy the problem requirements. (Unless you kept the tree balanced somehow, as Sane suggested.)
No, it was just a simple binary tree - I didn't see anything in the problem requirements in the PDF about O(nlogn), just Sane's assertion that a N^2 algorithm can't finish it. Clearly, that is not the case.
The Dark is offline   Reply With Quote