<commit_before>#include <map>
#include "test.h"

bool integrity_test(int *unsorted, int *sorted, unsigned int len)
{
	return false;
}

bool sort_test(int *arr, unsigned int len)
{
	for (unsigned int i = 0; i < len - 1; i++)
	{
		if (arr[i] > arr[i + 1])
			return false;
	}

	return true;
}<commit_msg>Implemented integrity test.<commit_after>#include <unordered_map>
#include "test.h"

bool integrity_test(int *unsorted, int *sorted, unsigned int len)
{
	std::unordered_map<unsigned int, int> counts;
	for (unsigned int i = 0; i < len; i++)
	{
		counts[unsorted[i]]++;
		counts[sorted[i]]--;
	}

	for each (auto count in counts)
	{
		if (count.second != 0)
			return false;
	}

	return true;
}

bool sort_test(int *arr, unsigned int len)
{
	for (unsigned int i = 0; i < len - 1; i++)
	{
		if (arr[i] > arr[i + 1])
			return false;
	}

	return true;
}
{'fraction_non_alphanumeric': 0.1562867215041128, 'fraction_numerical': 0.009400705052878966, 'mean_word_length': 3.707182320441989, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, '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': '1755380', 'n_tokens_mistral': 362, 'n_tokens_neox': 335, 'n_words': 101}