.NET
treaps.txt
Associated article: Treaps in Java
Tags: .NET
Published source code accompanying the article by Stefan Nilsson in which he discusses "treaps"--the randomized search trees discovered by C.R. Aragon and R. Seidel, provides the functionality of a general-purpose sorting routine, priority queue, hash-table, stack, or standard queue. Stefan shows you how to implement treaps in Java. Also see TREAPS.ZIP.
_Treaps in Java_
by Stefan Nilsson
Listing One
/* An interface for ordered objects. A class that is to be used
* as a key in a treap must implement this interface. */
public interface Ordered
{
/* Compares two ordered objects. Returns the value 0 ...


