Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 #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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago

Question

3. How has Starbucks changed since its early days?

Answered: 1 week ago