Question: / / Bubble Sort Algorithm , order ascendent void sortArray ( int array [ ] , int size ) { bool swap; int temp; do
Bubble Sort Algorithm order ascendent
void sortArrayint array int size
bool swap;
int temp;
do
swap false;
for int count ; count size ; count
if arraycount arraycount
temp arraycount;
arraycount arraycount ;
arraycount temp;
swap true;
while swap;
Median Function In statistics, when a set of values is sorted in ascending or descending order, its median is the middle value. If the set contains an even number of values, the median is the mean, or average, of the two middle values. Write a function that accepts as arguments the following:
An array of integers
An integer that indicates the number of elements in the array the function should determine the median of the array. This value should be returned as a double. Assume the values in the array are already sorted.
Demonstrate your pointer prowess by using pointer notation instead of array notation in this function.
Modify a BubbleSort Algorithm with a floatingpoint datatype, descendant order, and pointer notation.
Write a function that returns a pointer floatingpoint datatype that stores the median of the list of values.
Write a drive program that invokes your functions.
Define all variables dynamically and write the code to deallocate the memory space occupied by them.
Shows the output code with the following values:
a n
b n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
