minor.
This commit is contained in:
parent
a3d2c0a089
commit
e41a44b9a4
@ -363,6 +363,8 @@ RBT.prototype.rotr = function rotr(x) {
|
||||
*/
|
||||
|
||||
RBT.prototype.min = function min(z) {
|
||||
if (z.isNull())
|
||||
return z;
|
||||
while (!z.left.isNull())
|
||||
z = z.left;
|
||||
return z;
|
||||
@ -376,6 +378,8 @@ RBT.prototype.min = function min(z) {
|
||||
*/
|
||||
|
||||
RBT.prototype.max = function max(z) {
|
||||
if (z.isNull())
|
||||
return z;
|
||||
while (!z.right.isNull())
|
||||
z = z.right;
|
||||
return z;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user