?? treapnode.java
字號:
package DataStructures;
// Basic node stored in treaps
// Note that this class is not accessible outside
// of package DataStructures
class TreapNode
{
// Constructors
TreapNode( Comparable theElement )
{
this( theElement, null, null );
}
TreapNode( Comparable theElement, TreapNode lt, TreapNode rt )
{
element = theElement;
left = lt;
right = rt;
priority = randomObj.randomInt( );
}
// Friendly data; accessible by other package routines
Comparable element; // The data in the node
TreapNode left; // Left child
TreapNode right; // Right child
int priority; // Priority
private static Random randomObj = new Random( );
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -