title: Deleting key from a B+ Tree
body: <p>My professor was giving a lecture on B+ Trees deletion, and I got very confused. According to him for deleting any key from a B+ Tree:</p>
  
  <pre><code>1- First navigate to the leaf *L* where it belongs.
  2- If the *L* is at least half full if you can simply delete it.
  3- If it contains d-1 elements then you need to redistribute and merge.
  </code></pre>
  
  <p>If you see the below image, here I want to delete 19 and 20 from the B+ Tree.</p>
  
  <p><a href="https://i.stack.imgur.com/NBt66.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NBt66.png" alt="enter image description here"></a></p>
  
  <p>After deleting 19 and 20 from the B+ Tree.</p>
  
  <p><a href="https://i.stack.imgur.com/eCgVD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eCgVD.png" alt="enter image description here"></a></p>
  
  <p>Question:</p>
  
  <p>I am confused why the redistribution and merging is required here at all? If you just simply delete 19 and 20 from the leaf nodes without any distribution it should work right? Why redistribution is performed here? Could anyone explain? </p>
  
  <blockquote>
    <p>Is it because the left pointer of 24 is pointing to 20 but no 19.
    Thats why redistribution is required for 20 but not 19.</p>
  </blockquote>