title: Complexity of insert(0, c) operation on StringBuffer: is it O(1)?
body: <p>I am aware that the append() operation for StringBuffer takes O(1) time and it avoids the overhead of creating multiple copies of String objects as compared to String concatenation. </p>
  
  <p>What about insert(int offset, char c)?</p>
  
  <p>I need to repeatedly call this operation so as to add in new characters one by one in a reversed order to the StringBuffer object. For example, </p>
  
  <pre><code>StringBuffer sb = new StringBuffer();
  sb.insert(0, 'c');
  sb.insert(0, 'b');
  sb.insert(0, 'a');
  System.out.println(sb.toString()); //prints out "abc";
  </code></pre>
  
  <p>In an ideal situation, each insert(0, c) is supposed to be O(1) if internally that StringBuffer object looks like a linked list of characters. I wish to confirm if this is really the case.</p>