Question: A ) Given an array of distinct positive integer, write a pseudo code that outputs smallest, largest and median values in the array. You have

A) Given an array of distinct positive integer, write a pseudo code that outputs smallest, largest and median values in the array. You have to use MERGE-SORT algorithm. ( C++)

B) Let f(1) = 2 and f(2) = 1. Write a recursive function (pseudocode) which generates a sequence of numbers defined by the equation f(n) = f(n 1) + f(n 2), for n 2. (C++)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!