Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C BigInt Implement a function that takes an array of numbers, and prints a list

ID: 3540893 • Letter: C

Question

C BigInt Implement a function that takes an array of numbers, and prints a list of the middle half of these numbers. (Eliminate the best quarter and the Worst Quarter). This can be done using simple iterative method. First, let N be the total number of numbers. This begins a loop that eliminates numbers one at a time, until only half are left  within the loop. Let first be a pointer to the first array element that is still included, last be a pointer to the last one and r(the number of remaining) be initialized to N each time around the loop, either first is incremented or last is decremented by 1 At each step. a.       If r is even, find the remaining numbers with the smallest number and swap it with the number at first Then increment first, decrements r and repeat. If r is odd, find the remaining number with the biggest number and swap it with the number at last, Then decrements last and r and repeat b.      Quit when r<=N/2.Return the values of first and r. When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> id="yui_3_7_2_1_1377180795627_2584">face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2584"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> id="yui_3_7_2_1_1377180795627_2584">face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2584"> C BigInt Implement a function that takes an array of numbers, and prints a list of the middle half of these numbers. (Eliminate the best quarter and the Worst Quarter). This can be done using simple iterative method. First, let N be the total number of numbers. This begins a loop that eliminates numbers one at a time, until only half are left  within the loop. Let first be a pointer to the first array element that is still included, last be a pointer to the last one and r(the number of remaining) be initialized to N each time around the loop, either first is incremented or last is decremented by 1 At each step. a.       If r is even, find the remaining numbers with the smallest number and swap it with the number at first Then increment first, decrements r and repeat. If r is odd, find the remaining number with the biggest number and swap it with the number at last, Then decrements last and r and repeat b.      Quit when r<=N/2.Return the values of first and r. When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> id="yui_3_7_2_1_1377180795627_2584">face="times new roman, new york, times, serif"> Implement a function that takes an array of numbers, and prints a list of the middle half of these numbers. (Eliminate the best quarter and the Worst Quarter). This can be done using simple iterative method. First, let N be the total number of numbers. This begins a loop that eliminates numbers one at a time, until only half are left  within the loop. Let first be a pointer to the first array element that is still included, last be a pointer to the last one and r(the number of remaining) be initialized to N each time around the loop, either first is incremented or last is decremented by 1 At each step. a.       If r is even, find the remaining numbers with the smallest number and swap it with the number at first Then increment first, decrements r and repeat. If r is odd, find the remaining number with the biggest number and swap it with the number at last, Then decrements last and r and repeat b.      Quit when r<=N/2.Return the values of first and r. When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> a.       If r is even, find the remaining numbers with the smallest number and swap it with the number at first Then increment first, decrements r and repeat. If r is odd, find the remaining number with the biggest number and swap it with the number at last, Then decrements last and r and repeat b.      Quit when r<=N/2.Return the values of first and r. When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> b.      Quit when r<=N/2.Return the values of first and r. When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> When only half the numbers are left write that list to the monitor. Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> Here is the prototype of your function // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> // Void  PrintMiddleHalf ( int array [], int N) ;  Implement This using with & without recursionface="times new roman, new york, times, serif"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> id="yui_3_7_2_1_1377180795627_2584">face="times new roman, new york, times, serif"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> id="yui_3_7_2_1_1377180795627_2592">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2583"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> id="yui_3_7_2_1_1377180795627_2594">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2591"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> id="yui_3_7_2_1_1377180795627_2596">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2593"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> id="yui_3_7_2_1_1377180795627_2598">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2595"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif"> id="yui_3_7_2_1_1377180795627_2599">face="times new roman, new york, times, serif" id="yui_3_7_2_1_1377180795627_2597"> What is the BIG-O notation of your function ?face="times new roman, new york, times, serif">

Explanation / Answer

http://www.cs.ccsu.edu/~jones/chap13.pdf