I've read the wikipedia that has some insight on how a loser tournament tree ought to be constructed, but I'm confused as hell by the pseudo-code shown.

How are you supposed to get the overall winner's leaf node, without traversing the whole tree from root to bottom?

Do they refer to the "index" stored in inner nodes as a reference to the actual leaf node that the value of a given node originated from?

Help me not lose my sanity.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.