code: function maxValueNode(root) {
    var current = root;
    while (current.right) {
      current = current.right;
    }
    return current;
  }
docs: Gets the maximum value node, rooted in a particular node.
  
  @private
  @param {Node} root The node to search.
  @return {Node} The node with the maximum key in the tree.