

#include<iostream>
#include<string>
using namespace std;

void setupStrings(string[], int);
void bubbleSort(string[], int);

int main()
{
	string str1000[1000], str2000[2000], str3000[3000];
	string str4000[4000], str5000[5000], str6000[6000];
	
	setupStrings(str1000, 1000);
	setupStrings(str2000, 2000);
	setupStrings(str3000, 3000);
	setupStrings(str4000, 4000);
	setupStrings(str5000, 5000);
	setupStrings(str6000, 6000);

	for (int i = 0; i < 100; i++)
	{
		cout << i << " " << str1000[i] << endl;
	}

	cout << endl;
	bubbleSort(str1000, 1000);//does not sort
	
	for (int i = 0; i < 100; i++)
	{
		cout <<i<<" "<< str1000[i] << endl;
	}
	

	return 0;
}

void setupStrings(string array[], int size)
{

	char charset[52] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
		'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
		'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
	string randomstr;
	int randomdx;
	for (int x = 0; x < size; x++)
	{
		for (int i = 1; i <= 25; i++)
		{
			randomdx = rand() % 52;
			randomstr = randomstr + charset[randomdx];
		}
		array[x] = randomstr;
		randomstr.erase(0, 25);
	}


}

void bubbleSort(string array[], int size)
{
	string temp;
	int swap=0;
	int i = 0;
	for (i = 0; i < size;)
	{
		
		if (array[i] > array[i + 1])
		{
			temp = array[i];
			array[i] = array[i + 1];
			array[i + 1] = temp;
			
		}
//		temp.erase(0, 25);
		i++;
	}

	return;

}
