title: sort arrays of array in lexiographical order
body: <p>I was wondering how can I sort arrays of array. For example, I have got a char array like</p>
  
  <pre><code>0[a,b]
  1[b,a]
  2[a,a]
  </code></pre>
  
  <p>and this should be sorted to:</p>
  
  <pre><code>0[a,a]
  1[a,b]
  2[b,a]
  </code></pre>
  
  <p>In other words I want to sort the different array locations in lexicographical order.</p>