title: Deletion from B-Tree - M=5
body: <p>I'm dealing with a deletion in BTree in very specific case</p>
  
  <p>M=5 - that is - maximum number of keys in node is 4 and minimum number of keys in node is 2</p>
  
  <p>Now when deleting in BTree using the defensive approach (I must use this one) when I approach a node I must guarantee that it has one key more than the minimum required. </p>
  
  <p>Here is my problem - let's say I have a root with one key and two children with 2 keys each.
  When I will approach one of these children I will have to guarantee that it has at least 3 keys (because M=5).</p>
  
  <p>I have two ways to do it - borrow from neighbor or borrow from father and merge. I can't borrow from neighbor as it has the minimum of 2 keys but borrowing from the father and merging creates a node with 5 keys - and it's more than the maximum of the allowed keys (as M=5).</p>
  
  <p>What should I do in this case?
  More specifically - what is the correct way to treat such situation </p>