original_string: public function put($element)
      {
          $nodeId   = count($this->_heap);
          $parentId = ($nodeId-1) >> 1;   // floor( ($nodeId-1)/2 )
  
          while ($nodeId != 0  &&  $this->_less($element, $this->_heap[$parentId])) {
              // Move parent node down
              $this->_heap[$nodeId] = $this->_heap[$parentId];
  
              // Move pointer to the next level of tree
              $nodeId   = $parentId;
              $parentId = ($nodeId-1) >> 1;   // floor( ($nodeId-1)/2 )
          }
  
          // Put new node into the tree
          $this->_heap[$nodeId] = $element;
      }
code: public function put($element)
      {
          $nodeId   = count($this->_heap);
          $parentId = ($nodeId-1) >> 1;   // floor( ($nodeId-1)/2 )
  
          while ($nodeId != 0  &&  $this->_less($element, $this->_heap[$parentId])) {
              // Move parent node down
              $this->_heap[$nodeId] = $this->_heap[$parentId];
  
              // Move pointer to the next level of tree
              $nodeId   = $parentId;
              $parentId = ($nodeId-1) >> 1;   // floor( ($nodeId-1)/2 )
          }
  
          // Put new node into the tree
          $this->_heap[$nodeId] = $element;
      }
code_tokens: public function put ( $ element ) { $ nodeId = count ( $ this -> _heap ) ; $ parentId = ( $ nodeId - 1 ) >> 1 ; // floor( ($nodeId-1)/2 ) while ( $ nodeId != 0 && $ this -> _less ( $ element , $ this -> _heap [ $ parentId ] ) ) { // Move parent node down $ this -> _heap [ $ nodeId ] = $ this -> _heap [ $ parentId ] ; // Move pointer to the next level of tree $ nodeId = $ parentId ; $ parentId = ( $ nodeId - 1 ) >> 1 ; // floor( ($nodeId-1)/2 ) } // Put new node into the tree $ this -> _heap [ $ nodeId ] = $ element ; }
docstring: Add element to the queue
  
  O(log(N)) time
  
  @param mixed $element
docstring_tokens: Add element to the queue