<commit_before>package io.uuddlrlrba.ktalgs.sorts

class SelectionSort : AbstractSortStrategy() {
    public override fun<T : Comparable<T>> perform(arr: Array<T>) {
        for (i in arr.indices) {
            var min = i
            for (j in i+1..arr.size) {
                if (arr[j] < arr[min]) {
                    min = j
                }
            }
            if (min != i) exch(arr, min, i)
        }
    }
}<commit_msg>fix(sorts): range of the insertion sort<commit_after>package io.uuddlrlrba.ktalgs.sorts

class SelectionSort : AbstractSortStrategy() {
    public override fun<T : Comparable<T>> perform(arr: Array<T>) {
        for (i in arr.indices) {
            var min = i
            for (j in i+1..arr.size-1) {
                if (arr[j] < arr[min]) {
                    min = j
                }
            }
            if (min != i) exch(arr, min, i)
        }
    }
}
{'fraction_non_alphanumeric': 0.12666666666666668, 'fraction_numerical': 0.0033333333333333335, 'mean_word_length': 1.4550408719346049, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5320445', 'n_tokens_mistral': 297, 'n_tokens_neox': 286, 'n_words': 71}