Question
Please help! The question is below in bold. #ifndef SORTUTIL_H #define SORTUTIL_H #include #include using namespace std; namespace SortUtil { /* Task: You will need
Please help! The question is below in bold.
#ifndef SORTUTIL_H #define SORTUTIL_H
#include
using namespace std;
namespace SortUtil { /* Task: You will need to templatize these function prototypes so that they take arrays of any type. For now, they will work with int data. Do not templatize them until you get the program to work with int data. */ /** * This function sorts the items in an array into ascending order * using the bubble sort algorithm. * @param data - the array containing the data. * @param size - the number of elements in the array. */ void bubbleSort(int data[], int size); /** * This function sorts the items in an array into ascending order * using the selection sort algorithm. * @param data - the array containing the data. * @param size - the number of elements in the array. */ selectionSort(int data[], int size); /** * This function sorts the items in an array into ascending order * using the insertion sort algorithm. * @param data - the array containing the data. * @param size - the number of elements in the array. */ void insertionSort(int data[], int size); /** * This function sorts the items in an array into ascending order * using the merge sort algorithm. * @param data - the array containing the data. * @param start - the starting index. * @param end - the ending index. */ void quickSort(int data[], int start, int end); /** * This function sorts the items in an array into ascending order * using the merge sort algorithm. * @param array the array containing the data. * @param size the number of elements in the array. */ void mergeSort(int array[], int size); } #endif
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started