algorithm,data-structures,prims-algorithm,treap

This will not necessarily make Prim's algorithm any faster. Consider the following degenerate case - you have n nodes v1, v2, ..., vn, and their priorities are such that p(v1) < p(v2) < p(v3) < ... < p(vn). In that case, the treap will be a degenerate linked list, and...

Yes it makes sense. Generally you can treat references as pointers (with some restrictions). So you could change references to pointers in your example. Of course the syntax would also change in the, but we don't need to bother with it. Your example would look like: void tsplit(tnode t, tnode...

It's an optimal data structure to use as an example in randomized algorithms classes. OK, flippancy aside, the narrow advantages suggested by Aragon and Seidel include the following. They're simple. Yes, your standard library may have a red-black tree available, but it's likely that it doesn't provide enough hooks to...