private static void showArray(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(Integer.toString(array[i]));
            System.out.print(" ");
        }
        System.out.println();
    }