title: Which data structure should I use to have fast deletion/insertion and max (or min) search?
body: <p>I am looking for a data structure that could ensure at least Log(n) complexity for deletion and insertion of a node and something close to O(1) or amortized Log(n) to search the maximum (or minimum) value.</p>
  
  <p>I was thinking to use a self-balanced BST (which one?) modified to sort of remember the maximum (or minimum) value inserted.</p>
  
  <p>Any suggestion?</p>
  
  <p>Sorry I have to edit the question...of course a self-balanced BST can allow to search max and min in log(n), but I was thinking about something more toward O(1).</p>