[Solved]Lab13cpp Include Include Include Used Initialization Random Number Generator Using Namespa Q37060937

*********************lab13.cpp********************
#include <cstdlib>
#include <cassert>
#include <ctime> // used in initialization of randomnumber generator
using namespace std;
template <typenameT>
bool is_sorted (T* a, size_t size);
// precondition: a is not NULL
// returns: whether array a is sorted
template <typenameT>
void shell_sort (T* a, size_t size);
// precondition: a is not NULL
// postcondition: a is sorted in non-decreasingorder
int* create_array (size_t size);
// returns an array with size random integers
int main ()
{
size_t size = 1000;
int* a = create_array (size);
shell_sort (a, size);
assert (is_sorted (a, size));
delete a;
return EXIT_SUCCESS;
}
——–Please implement the shell sort functions. Thank You
The goal of this assignment is to reinforce sorting algorithms in C++. Specifically, the lab is to implement the shell sort. Please use lab13.cpp as your starting point. Read Chapter 13 before your lab to understand different sorting techniques. Shell Sort is a variation of Insertion Sort explained in this chapter. Here is another link to help you understand this Shell sorting technique: https://www.tutorialspoint.com/data structures_algorithms/shell_sort algorithm.htm Show transcribed image text The goal of this assignment is to reinforce sorting algorithms in C++. Specifically, the lab is to implement the shell sort. Please use lab13.cpp as your starting point. Read Chapter 13 before your lab to understand different sorting techniques. Shell Sort is a variation of Insertion Sort explained in this chapter. Here is another link to help you understand this Shell sorting technique: https://www.tutorialspoint.com/data structures_algorithms/shell_sort algorithm.htm
Expert Answer
Answer to *********************lab13.cpp******************** #include #include #include // used in initialization of random number… . . .
OR

