//ANASTASIA_PAPOUDA_12736
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "row.hpp"

int main() {
	srand(time(NULL)); //random numbers each time

	int *b = new int[10]; //creates an array of 10 integers
	for (int i = 0; i < 10; i++ ) { //fills the array
		b[i] = rand() % 100;
	}

	/* creates a new row object on the heap/
	inside it allocates new memory/
	copies the 10 integers from array b into this new memory/
	stores the size (10)/
	makes 'a' point to that object.
	*/
	row<int> *a = new row<int>(b,10);

	std::cout << "Original: " << *a << std::endl; //prints the given numbers

	//testing all sorting algorithms

	bubble_sort(*a);
	std::cout << "Bubble: " << *a << std::endl;

	selection_sort(*a);
	std::cout << "Selection: " << *a << std::endl;

	insertion_sort(*a);
	std::cout << "Insertion: " << *a << std::endl;

	merge_sort(*a);
	std::cout << "Merge: " << *a << std::endl;

	quick_sort(*a);
	std::cout << "Quick: " << *a << std::endl;

	enumeration_sort(*a);
	std::cout << "Enumeration: " << *a << std::endl;

	//free the memory
	delete[] b; //delete the original array
	delete a; //delete the row object

	return 0;
}
