function mergeWithChild(parent, node) {
  if (!parent.child) {
    parent.child = node;
  }
  else {
    node.right = parent.child.right;
    node.left = parent.child;
    parent.child.right.left = node;
    parent.child.right = node;
  }
}
Function used to merge the given node with the child list of a root node.

@param {Node} parent - Parent node.
@param {Node} node   - Target node.