I need a test program for my C++ quicksort implementation.
I have a partial driver program for just the basic stuff, butfor the life of me I can’t figure out how to fill an array withnumbers 0-1000 that are organized in a random order withoutduplicates, print the generated unsorted array and then sort it andprint the sorted array.
My header and source files are as follows
//Quick.h
#pragma once
#include <algorithm> // Provides swap
#include <cstdlib> // ProvidesEXIT_SUCCESS, size_t
#include <iostream>
using namespace std;
static void partition(int data[], size_t n, size_t&pivot_index);
void quicksort(int data[], size_t n);
—————————————————————————————————————
//Quick.cpp
#include “stdafx.h”
#include “Quick.h”
#include <algorithm> // Provides swap
#include <cstdlib> // ProvidesEXIT_SUCCESS, size_t
#include <iostream>
#include <fstream>
#include <random>
#include <chrono>
using
PayPal Gateway not configured
PayPal Gateway not configured