<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DataStructuresAlgorithms.Algorithms
{
    public class ArraySorting
    {
        // Greater elements bubble up to the top end of the array.
        public static void BubbleSort(int[] arr)
        {
            int o, i;
            bool swapped;
            for (swapped = true, o = arr.Length - 1; swapped && o > 0; o--)
            {
                for (i = 0, swapped = false; i < o; i++)
                {
                    if (arr[i] > arr[i + 1])
                    {
                        Swap(ref arr[i], ref arr[i + 1]);
                        swapped = true;
                    }
                }
                // Invariant: arr[o:] in final position
            }<commit_msg>DataStructuresAlgorithms.Algorithms.ArraySorting is a static class<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DataStructuresAlgorithms.Algorithms
{
    public static class ArraySorting
    {
        // Greater elements bubble up to the top end of the array.
        public static void BubbleSort(int[] arr)
        {
            int o, i;
            bool swapped;
            for (swapped = true, o = arr.Length - 1; swapped && o > 0; o--)
            {
                for (i = 0, swapped = false; i < o; i++)
                {
                    if (arr[i] > arr[i + 1])
                    {
                        Swap(ref arr[i], ref arr[i + 1]);
                        swapped = true;
                    }
                }
                // Invariant: arr[o:] in final position
            }
{'fraction_non_alphanumeric': 0.09730363423212192, 'fraction_numerical': 0.005861664712778429, 'mean_word_length': 1.282085561497326, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1083430', 'n_tokens_mistral': 481, 'n_tokens_neox': 453, 'n_words': 141}