E e = findMin(); remove(e); return e;to the contents of those functions. I still have no real idea what causes these errors...
I also optimised the removeMin operation a little (took advantage of the fact that findMin already splayed the tree on the the leftmost element, which means the remove() does not need to repeat this operation).
But unfortunately, no sigar. The SplayTreeQueue seems to be one of the slowest (definitely not faster than the JavaPriorityQueue) priority queues tested yet.
Geen opmerkingen:
Een reactie posten