This commit is contained in:
Christopher Jeffrey 2016-07-03 11:12:21 -07:00
parent a3d2c0a089
commit e41a44b9a4
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;