title: Quick Sort using C#
body: <p>Hello I trying to do a QuickSort but didn't appear the result, For example the user input &quot;cdabe&quot; so the expected result is &quot;abcde&quot;. May I know what is the cause why the result didn't display?
  because There is no error in the code. I'm using MVC. My MergeSort is working properly but my QuickSort didn't.</p>
  <p>Model :</p>
  <pre><code>public string QuickSort()
              {
                  string arrangedSort = &quot;&quot;;
                  string Word= &quot;cdabe&quot;;
                  List&lt;string&gt; ListLetters = new List&lt;string&gt;();
                  for (int i = 0; i &lt; Word.Length; i++)
                  {
                      ListLetters.Add(Word.Substring(i, 1)); 
                  }
                 
                  aQuicksort(Word, 0, ListLetters.Count - 1);
      
               
                void aQuicksort(string Word, int left, int right)
                  {
                      int i = left;
                      int j = right;
      
                      var pivot = Word[(left + right) / 2];
      
                      while (i &lt;= j)
                      {
                          while (char.Parse(ListLetters[i]) &lt; pivot)
                              i++;
      
                          while (char.Parse(ListLetters[i]) &gt; pivot)
                              j--;
      
                          if (i &lt;= j)
                          {
                              var tmp = ListLetters[i];
                              ListLetters[i] = ListLetters[j];
                              ListLetters[j] = tmp;
      
                              i++;
                              j--;
                          }
                      }
      
                      if (left &lt; j)
                          aQuicksort(Word, left, j);
      
                      if (i &lt; right)
                          aQuicksort(Word, i, right);
      
                      foreach (var listLetter in ListLetters)
                      {
                          arrangedSort += listLetter;
                      }
                      
      
                  }
      
                  return arrangedSort;
      
      
              }
  </code></pre>