public void sort1(List<Integer> list) {
        if (list.size() < 2)
            return;

        int count = 0;
        // double for-loop and both are related with variable "end"
        // O(n^2)
        int end = list.size();
        boolean swapped;
        do {
            swapped = false;
            for (int idx = 0; idx < end - 1; ++idx) {
                int left = list.get(idx);
                int right = list.get(idx + 1);
                if (left > right) {
                    list.set(idx + 1, left);
                    list.set(idx, right);

                    swapped = true;
                }

                ++count;    // loop time
            }
        } while (swapped);

        LH_.checkNaive(list);
        System.out.println("Looped " + count + " times");
    }