This content has been marked as final. Show 3 replies
It's a question for a lawyer, not a bunch of programmers, but I imagine you would have to at least start from the OpenJDK source, not the Sun/Oracle source, unless you want to lose it to Oracle.
i took a quick peek at the code. one thing i noticed is that you double the traversal time on put: first you go down (normal), then you go back up to update the weights. seems like you should be able to do this all in a single pass (update weights on the way down).
Good point. Adding one (or deducting one) from the very root downwards. And then if rotation occurs (which doesn't happen very often) we'll have to go up again. Thanks!