title: What is wrong in this sorting?
body: <p>In a recent interview I was asked to write sorting algorithm. I did it in following way. I wanted to understand what is wrong in this approach? When I test with 500 intergers it gives better time complexity than bubble sort. Reason I am asking is, that interviewer failed me for this.</p>
  
  <pre><code>static int[] SortedNumbers(int[] numbers)
  {
      for (int i = 0; i &lt; numbers.Length - 1; i++)
      {
          int temp;
          if (numbers[i] &gt; numbers[i + 1])
          {
              temp = numbers[i];
              numbers[i] = numbers[i + 1];
              numbers[i + 1] = temp;
          }
  
          if (i &gt; 0)
          {
              for (int j = 0; j &lt; i; j++)
              {
                  if (numbers[j] &gt; numbers[i])
                  {
                      temp = numbers[i];
                      numbers[i] = numbers[j];
                      numbers[j] = temp;
                  }
              }
          }
      }
      return numbers;
  }
  </code></pre>