public static int[] sort(int[] list) {
      if (list.length == 1) {
          return list;
      } else {
          int[] listL = new int[list.length / 2];
          int[] listR = new int[list.length - list.length / 2];
          int Center = list.length / 2;
          for (int i = 0; i < Center; i++) {
              listL[i] = list[i];
          }
          for (int i = Center, j = 0; i < list.length; i++, j++) {
              listR[j] = list[i];
          }

          int[] sortedListL = sort(listL);
          int[] sortedListR = sort(listR);
          int[] result = mergeTwoList(sortedListL, sortedListR);
          return result;
      }
  }