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

        int count = 0;
        for (int idx = 1; idx < list.size(); ++idx) {
            int current = list.get(idx);
            int expectedIdx = idx;

            // searching in the sorted part
            for (int sortedIdx = idx - 1; sortedIdx >= 0; --sortedIdx) {
                ++count;

                int search = list.get(sortedIdx);

                // encounters larger elements
                if (search > current )
                    expectedIdx = sortedIdx;

                // once encounters smaller element
                if (search < current)
                    // stop searching
                    break;
            }

            if (expectedIdx != idx) {
                // remove current element from its old idx
                list.remove(idx);

                // insert current element into expectedIdx
                list.add(expectedIdx, current);
            }
        }

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