title: Where can I find the algorithm in pseudocode for deleting a key from a B-Tree?
body: <p>I am reading the chapter on B-Trees in Introduction to Algorithms (3rd edition) by Cormen and found the deletion procedure very confusing. I could understand the algorithm for insertion because it provided the pseudocode along with a few examples, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Su6lO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Su6lO.jpg" alt="Algorithm to insert a key &#39;k&#39; into a tree T"></a></p>
  
  <p><a href="https://i.stack.imgur.com/axggo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/axggo.jpg" alt="Algorithm for the sub-procedure Insert-Nonfull(x,k) in B-Tree-Insert"></a></p>
  
  <p>But for deletion, it just says... "We sketch how deletion works instead of presenting the pseudocode" followed by steps which are very confusing. The very first step says:</p>
  
  <blockquote>
    <ol>
    <li>If the key k is in node x and x is a leaf, delete the key k from x.</li>
    </ol>
  </blockquote>
  
  <p>But if I delete a key from the leaf, won't it violate the B-tree property if the number of keys is less than the minimum required?</p>