title: Radix sort implemented in c++ for string
body: <p>i just need radix sort implementation in c++ language which works for strings </p>
  
  <p>i already have the one which works for normal integers</p>
  
  <pre><code>vector &lt; vector &lt; int&gt; &gt; blocks[7];
  void radixSort(int rsarr[],int length){
  
      int index;
      vector&lt;int&gt; helper;
      vector&lt; vector&lt;int&gt; &gt; helper2;
      for(int e=0;e&lt;10;e++){
          helper2.push_back(helper);
      }
      for(int r=0;r&lt;7;r++){
      blocks[r]=helper2;
      }
      for(int y=0;y&lt;length;y++){
  
          index=(int)(rsarr[y])%10;
          blocks[0][index].push_back((rsarr[y])); 
      }
  
      for(int j=1;j&lt;7;j++)
      {   
          for(int k=0;k&lt;10;k++)
          {
              for(int i=0;i&lt;blocks[j-1][k].size();i++)
              {           
              index=(int)(blocks[j-1][k][i]/pow(10,j))%10;
              blocks[j][index].push_back(blocks[j-1][k][i]);
              }
  
          }       
      }           
      int q=0;
      for(int f=0;f&lt;blocks[6][0].size();f++){         
          rsarr[q]=   blocks[6][0][f];
          q++;        
      }
      if(blocks[6][1].size()==1)
      {
          rsarr[q]=blocks[6][1][0];   
      }
      for(int z=0;z&lt;7;z++)
      {
          blocks[0].clear();
      }
  }
  </code></pre>