void QuickSort(int left, int right)
{ 
  int i;
  int j;
  int x;

  i = left;
  j = right;
  x = Vektor[left+right / 2]
  do
  {
    while ( Vektor[i] < x && i < right ) i++;
    while ( x < Vektor[j] && j > left ) j--;
    if (i <= j)
    {
        SwapNumbers(i,j);
        i++;
        j--;
    }
  }
  while (i <= j);
  if (left < j) QuickSort(left,j);
  if (i < right) QuickSort(i,right);
}
