title: How to determine longest common prefix and suffix for array of strings?
body: <p>Suppose I have array of strings:</p>
  
  <p><code>["A12[1]", "A13[1]", "A14[1]"]</code></p>
  
  <p>And I need to find the longest common prefix <code>A1</code> and suffix <code>[1]</code>.</p>
  
  <p>Other examples:</p>
  
  <p><code>["9-b", "10-b", "11-b"]</code> -> suffix <code>-b</code>, no prefix</p>
  
  <p><code>["A12", "A14", "A6"]</code> -> prefix <code>A</code>, no sufix</p>
  
  <p><strong>How do I iterate over the array to find what string ends and starts every string in array?</strong></p>