code: func (p *DB) Put(key []byte, value []byte) error {
  	p.mu.Lock()
  	defer p.mu.Unlock()
  
  	if node, exact := p.findGE(key, true); exact {
  		kvOffset := len(p.kvData)
  		p.kvData = append(p.kvData, key...)
  		p.kvData = append(p.kvData, value...)
  		p.nodeData[node] = kvOffset
  		m := p.nodeData[node+nVal]
  		p.nodeData[node+nVal] = len(value)
  		p.kvSize += len(value) - m
  		return nil
  	}
  
  	h := p.randHeight()
  	if h > p.maxHeight {
  		for i := p.maxHeight; i < h; i++ {
  			p.prevNode[i] = 0
  		}
  		p.maxHeight = h
  	}
  
  	kvOffset := len(p.kvData)
  	p.kvData = append(p.kvData, key...)
  	p.kvData = append(p.kvData, value...)
  	// Node
  	node := len(p.nodeData)
  	p.nodeData = append(p.nodeData, kvOffset, len(key), len(value), h)
  	for i, n := range p.prevNode[:h] {
  		m := n + nNext + i
  		p.nodeData = append(p.nodeData, p.nodeData[m])
  		p.nodeData[m] = node
  	}
  
  	p.kvSize += len(key) + len(value)
  	p.n++
  	return nil
  }
docs: // Put sets the value for the given key. It overwrites any previous value
  // for that key; a DB is not a multi-map.
  //
  // It is safe to modify the contents of the arguments after Put returns.