public static <T extends Comparable<? super T>> void sort(List<T> input) {
        if (input.size() <= 1) {
            return;
        }
        // Going only till input.size() - 1 because as result of swapping the biggest element would be at last index
        // naturally
        for (int i = 0; i < input.size() - 1; i++) {
            int smallIndex = i;
            for (int j = i + 1; j < input.size(); j++) {
                if (input.get(j).compareTo(input.get(smallIndex)) < 0) {
                    smallIndex = j;
                }
            }
            if (smallIndex != i) {
                Collections.swap(input, i, smallIndex);
            }
        }
    }