-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBinomialNode.java
More file actions
28 lines (23 loc) · 825 Bytes
/
Copy pathBinomialNode.java
File metadata and controls
28 lines (23 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package DataStructures.Queue;
import DataStructures.Comparable;
// Basic node stored in binomial queues
// Note that this class is not accessible outside
// of package DataStructures
class BinomialNode
{
// Constructors
BinomialNode( Comparable theElement )
{
this( theElement, null, null );
}
BinomialNode( Comparable theElement, BinomialNode lt, BinomialNode nt )
{
element = theElement;
leftChild = lt;
nextSibling = nt;
}
// Friendly data; accessible by other package routines
Comparable element; // The data in the node
BinomialNode leftChild; // Left child
BinomialNode nextSibling; // Right child
}